Skip to content

Commit 2f1f349

Browse files
committed
Remove $errcontext argument to error handlers
I'm removing the argument entirely here, but we might want to change this to passing null or and empty array instead, if the impact of dropping it entirely turns out to be too large. This was deprecated as part of https://wiki.php.net/rfc/deprecations_php_7_2 as a doc-only deprecation.
1 parent 790798f commit 2f1f349

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+49
-59
lines changed

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ PHP 8.0 UPGRADE NOTES
3434
interpreted as strings.
3535
. Removed ability to specify an autoloader using an __autoload() function.
3636
spl_autoload_register() should be used instead.
37+
. Removed the $errcontext argument for custom error handlers.
3738
. Removed create_function(). Anonymous functions may be used instead.
3839
. Removed each(). foreach or ArrayIterator should be used instead.
3940
. Removed ability to unbind $this from closures that were created from a

Zend/tests/bug29890.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Bug #29890 (crash if error handler fails)
33
--FILE--
44
<?php
5-
function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine,$fClass) {
5+
function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine) {
66
echo "error :".$fErrStr."\n";
77
}
88

Zend/tests/bug29896.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Bug #29896 (Backtrace argument list out of sync)
33
--FILE--
44
<?php
5-
function userErrorHandler($num, $msg, $file, $line, $vars)
5+
function userErrorHandler($num, $msg, $file, $line)
66
{
77
debug_print_backtrace();
88
}
@@ -22,6 +22,6 @@ function GenerateError2($A1)
2222
GenerateError2("Test2");
2323
?>
2424
--EXPECTF--
25-
#0 userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11, Array ([A1] => Test1)) called at [%sbug29896.php:11]
25+
#0 userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11) called at [%sbug29896.php:11]
2626
#1 GenerateError1(Test1) called at [%sbug29896.php:16]
2727
#2 GenerateError2(Test2) called at [%sbug29896.php:19]

Zend/tests/bug35017.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ try {
1313
} catch(Exception $e) {
1414
echo "This Exception should be caught\n";
1515
}
16-
function errorHandler($errno, $errstr, $errfile, $errline, $vars) {
16+
function errorHandler($errno, $errstr, $errfile, $errline) {
1717
throw new Exception('Some Exception');
1818
}
1919
?>

Zend/tests/bug41209.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ echo "Done\n";
4141
--EXPECTF--
4242
Fatal error: Uncaught ErrorException: Undefined variable: id in %s:%d
4343
Stack trace:
44-
#0 %s(%d): env::errorHandler(8, '%s', '%s', 34, Array)
44+
#0 %s(%d): env::errorHandler(8, '%s', '%s', 34)
4545
#1 {main}
4646
thrown in %s on line %d

Zend/tests/bug45805.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $o->bar();
3838
--EXPECTF--
3939
Fatal error: Uncaught RuntimeException in %sbug45805.php:%d
4040
Stack trace:
41-
#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(8, 'Only variables ...', '%s', %d, Array)
41+
#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(8, 'Only variables ...', '%s', %d)
4242
#1 [internal function]: B->foo()
4343
#2 %sbug45805.php(%d): ReflectionMethod->invoke(Object(B))
4444
#3 %sbug45805.php(%d): B->bar()

Zend/tests/bug48004.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Bug #48004 (Error handler prevents creation of default object)
33
--FILE--
44
<?php
5-
function error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
5+
function error_handler($errno, $errstr, $errfile, $errline) {
66
return true;
77
}
88

Zend/tests/bug51394.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ $a = $empty($b);
1515
--EXPECTF--
1616
Fatal error: Uncaught Exception: error! in %sbug51394.php:%d
1717
Stack trace:
18-
#0 %sbug51394.php(%d): eh(8, 'Undefined varia%s', '%s', %d, Array)
18+
#0 %sbug51394.php(%d): eh(8, 'Undefined varia%s', '%s', %d)
1919
#1 {main}
2020
thrown in %sbug51394.php on line %d

Zend/tests/bug60909_1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require 'notfound.php';
1313
error(require(notfound.php): failed to open stream: %s)
1414
Warning: Uncaught Exception: Foo in %sbug60909_1.php:5
1515
Stack trace:
16-
#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8, Array)
16+
#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8)
1717
#1 %sbug60909_1.php(8): require()
1818
#2 {main}
1919
thrown in %sbug60909_1.php on line 5

Zend/tests/bug61767.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Error handler called (Undefined variable: undefined)
1919

2020
Fatal error: Uncaught ErrorException: Undefined variable: undefined in %sbug61767.php:%d
2121
Stack trace:
22-
#0 %sbug61767.php(%d): {closure}(%s, 'Undefined varia...', '%s', %d, Array)
22+
#0 %sbug61767.php(%d): {closure}(%s, 'Undefined varia...', '%s', %d)
2323
#1 {main}
2424
thrown in %sbug61767.php on line %d
2525
Shutting down

Zend/tests/bug64960.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete o
3333

3434
Fatal error: Uncaught Exception in %sbug64960.php:19
3535
Stack trace:
36-
#0 [internal function]: {closure}(8, 'ob_end_clean():...', '%s', 9, Array)
36+
#0 [internal function]: {closure}(8, 'ob_end_clean():...', '%s', 9)
3737
#1 %sbug64960.php(9): ob_end_clean()
3838
#2 [internal function]: ExceptionHandler->__invoke(Object(Exception))
3939
#3 {main}

Zend/tests/bug69388.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bug #69388: Use after free on recursive calls to PHP compiler
33
--FILE--
44
<?php
55

6-
function handle_error($code, $message, $file, $line, $context) {
6+
function handle_error($code, $message, $file, $line) {
77
if (!function_exists("bla")) {
88
eval('function bla($s) {echo "$s\n";}');
99
}

Zend/tests/bug69388_2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Bug #69388 - Variation
33
--FILE--
44
<?php
5-
function handle_error($code, $message, $file, $line, $context) {
5+
function handle_error($code, $message, $file, $line) {
66
eval('namespace Foo;');
77
echo "$message\n";
88
}

Zend/tests/bug72057.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set_error_handler(
1313
--EXPECTF--
1414
Fatal error: Uncaught Exception: My custom error in %s:%d
1515
Stack trace:
16-
#0 %s(%d): {closure}(8, 'A non well form...', '%s', %d, Array)
16+
#0 %s(%d): {closure}(8, 'A non well form...', '%s', %d)
1717
#1 %s(%d): {closure}('7as')
1818
#2 {main}
1919
thrown in %s on line %d

Zend/tests/bug72101.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ $foo->bar($a, $b, $c);
7676
--EXPECTF--
7777
Fatal error: Uncaught Error: Class 'DoesNotExists' not found in %sbug72101.php:61
7878
Stack trace:
79-
#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8, Array)
79+
#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8)
8080
#1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
8181
#2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static))
8282
#3 %sbug72101.php(52): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))

Zend/tests/bug76025.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ $c = $b[$a];
1313
--EXPECTF--
1414
Fatal error: Uncaught Exception: blah in %sbug76025.php:%d
1515
Stack trace:
16-
#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d, Array)
16+
#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d)
1717
#1 {main}
1818
thrown in %sbug76025.php on line %d

Zend/tests/bug76534.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ $y = &$x["bar"];
1212
--EXPECTF--
1313
Fatal error: Uncaught Exception: Illegal string offset 'bar' in %sbug76534.php:%d
1414
Stack trace:
15-
#0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d, Array)
15+
#0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d)
1616
#1 {main}
1717
thrown in %sbug76534.php on line %d

Zend/tests/nowdoc_015.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Test nowdoc and line numbering
33
--FILE--
44
<?php
5-
function error_handler($num, $msg, $file, $line, $vars) {
5+
function error_handler($num, $msg, $file, $line) {
66
echo $line,"\n";
77
}
88
set_error_handler('error_handler');

Zend/zend.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
12461246
va_list args;
12471247
#endif
12481248
va_list usr_copy;
1249-
zval params[5];
1249+
zval params[4];
12501250
zval retval;
12511251
const char *error_filename;
12521252
uint32_t error_lineno = 0;
@@ -1255,7 +1255,6 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
12551255
zend_class_entry *saved_class_entry;
12561256
zend_stack loop_var_stack;
12571257
zend_stack delayed_oplines_stack;
1258-
zend_array *symbol_table;
12591258
zend_class_entry *orig_fake_scope;
12601259

12611260
/* Report about uncaught exception in case of fatal errors */
@@ -1385,15 +1384,6 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
13851384

13861385
ZVAL_LONG(&params[3], error_lineno);
13871386

1388-
symbol_table = zend_rebuild_symbol_table();
1389-
1390-
/* during shutdown the symbol table table can be still null */
1391-
if (!symbol_table) {
1392-
ZVAL_NULL(&params[4]);
1393-
} else {
1394-
ZVAL_ARR(&params[4], zend_array_dup(symbol_table));
1395-
}
1396-
13971387
ZVAL_COPY_VALUE(&orig_user_error_handler, &EG(user_error_handler));
13981388
ZVAL_UNDEF(&EG(user_error_handler));
13991389

@@ -1414,7 +1404,7 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
14141404
orig_fake_scope = EG(fake_scope);
14151405
EG(fake_scope) = NULL;
14161406

1417-
if (call_user_function(CG(function_table), NULL, &orig_user_error_handler, &retval, 5, params) == SUCCESS) {
1407+
if (call_user_function(CG(function_table), NULL, &orig_user_error_handler, &retval, 4, params) == SUCCESS) {
14181408
if (Z_TYPE(retval) != IS_UNDEF) {
14191409
if (Z_TYPE(retval) == IS_FALSE) {
14201410
zend_error_cb(type, error_filename, error_lineno, format, args);
@@ -1435,7 +1425,6 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
14351425
CG(in_compilation) = 1;
14361426
}
14371427

1438-
zval_ptr_dtor(&params[4]);
14391428
zval_ptr_dtor(&params[2]);
14401429
zval_ptr_dtor(&params[1]);
14411430

ext/iconv/tests/iconv_mime_decode.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ iconv_mime_decode()
66
iconv.internal_charset=iso-8859-1
77
--FILE--
88
<?php
9-
function my_error_handler($errno, $errmsg, $filename, $linenum, $vars)
9+
function my_error_handler($errno, $errmsg, $filename, $linenum)
1010
{
1111
echo "$errno: $errmsg\n";
1212
}

ext/iconv/tests/iconv_mime_encode.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ iconv_mime_encode()
66
iconv.internal_charset=iso-8859-1
77
--FILE--
88
<?php
9-
function my_error_handler($errno, $errmsg, $filename, $linenum, $vars)
9+
function my_error_handler($errno, $errmsg, $filename, $linenum)
1010
{
1111
echo "$errno: $errmsg\n";
1212
}

ext/iconv/tests/iconv_strpos.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ iconv_strpos()
66
iconv.internal_charset=ISO-8859-1
77
--FILE--
88
<?php
9-
function my_error_handler($errno, $errmsg, $filename, $linenum, $vars)
9+
function my_error_handler($errno, $errmsg, $filename, $linenum)
1010
{
1111
echo "$errno: $errmsg\n";
1212
}

ext/iconv/tests/iconv_strrpos.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ iconv_strrpos()
66
iconv.internal_charset=ISO-8859-1
77
--FILE--
88
<?php
9-
function my_error_handler($errno, $errmsg, $filename, $linenum, $vars)
9+
function my_error_handler($errno, $errmsg, $filename, $linenum)
1010
{
1111
echo "$errno: $errmsg\n";
1212
}

ext/mbstring/tests/common.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
// Custom Error Hanlder for testing
7-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
7+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
88
global $debug;
99

1010
$err_type = array (

ext/mbstring/tests/mb_substitute_character_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function_exists('mb_substitute_character') or die("skip mb_substitute_character(
1616
echo "*** Testing mb_substitute_character() : usage variation ***\n";
1717

1818
// Define error handler
19-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
19+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
2020
if (error_reporting() != 0) {
2121
// report non-silenced errors
2222
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/posix/tests/posix_ttyname_variation6.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo "*** Test substituting argument 1 with object values ***\n";
1818

1919

2020

21-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
21+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
2222
if (error_reporting() != 0) {
2323
// report non-silenced errors
2424
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/spl/tests/class_implements_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "*** Testing class_implements() : variation ***\n";
1212

1313

1414
// Define error handler
15-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
15+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1616
if (error_reporting() != 0) {
1717
// report non-silenced errors
1818
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/spl/tests/class_uses_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "*** Testing class_uses() : variation ***\n";
1212

1313

1414
// Define error handler
15-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
15+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1616
if (error_reporting() != 0) {
1717
// report non-silenced errors
1818
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/standard/tests/array/array_diff_uassoc_variation14.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class classWithoutToString
1919
}
2020

2121
// Define error handler
22-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
22+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
2323
if (error_reporting() != 0) {
2424
// report non-silenced errors
2525
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/standard/tests/array/array_diff_ukey_variation11.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $array2 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
1515
$array3 = array(1, 2, 3, 4, 5);
1616

1717
// Define error handler
18-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
18+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1919
if (error_reporting() != 0) {
2020
// report non-silenced errors
2121
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/standard/tests/array/array_intersect_uassoc_variation11.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
1414
$array2 = array("a" => "green", "yellow", "red");
1515
$array3 = array("a"=>"green", "brown");
1616
// Define error handler
17-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
17+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1818
if (error_reporting() != 0) {
1919
// report non-silenced errors
2020
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/standard/tests/array/array_intersect_ukey_variation10.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
1515
$array3 = array("a"=>"green", "cyan");
1616

1717
// Define error handler
18-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
18+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1919
if (error_reporting() != 0) {
2020
// report non-silenced errors
2121
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/standard/tests/array/array_multisort_variation1.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation
1111
echo "*** Testing array_multisort() : usage variation ***\n";
1212

1313
// Define error handler
14-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
14+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1515
if (error_reporting() != 0) {
1616
// report non-silenced errors
1717
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/standard/tests/array/array_multisort_variation2.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation
1111
echo "*** Testing array_multisort() : usage variation ***\n";
1212

1313
// Define error handler
14-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
14+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1515
if (error_reporting() != 0) {
1616
// report non-silenced errors
1717
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/standard/tests/array/array_multisort_variation3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation
1111
echo "*** Testing array_multisort() : usage variation ***\n";
1212

1313
// Define error handler
14-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
14+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1515
if (error_reporting() != 0) {
1616
// report non-silenced errors
1717
echo "Error: $err_no - $err_msg, $filename($linenum)\n";

ext/standard/tests/array/array_multisort_variation8.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation - test sort order of all types
1111
echo "*** Testing array_multisort() : usage variation - test sort order of all types***\n";
1212

1313
// Define error handler
14-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
14+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1515
// We're testing sort order not errors so ignore.
1616
}
1717
set_error_handler('test_error_handler');

ext/standard/tests/class_object/get_class_methods_variation_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Test get_class_methods() function : usage variations - unexpected types
99
*/
1010

1111

12-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
12+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1313
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
1414
}
1515
set_error_handler('test_error_handler');

ext/standard/tests/class_object/get_parent_class_variation_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spl_autoload_register(function ($className) {
1212
echo "In autoload($className)\n";
1313
});
1414

15-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
15+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1616
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
1717
}
1818
set_error_handler('test_error_handler');

ext/standard/tests/class_object/is_subclass_of_variation_001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spl_autoload_register(function ($className) {
1212
echo "In autoload($className)\n";
1313
});
1414

15-
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
15+
function test_error_handler($err_no, $err_msg, $filename, $linenum) {
1616
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
1717
}
1818
set_error_handler('test_error_handler');

0 commit comments

Comments
 (0)