]> granicus.if.org Git - php/commitdiff
Remove $errcontext argument to error handlers
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 30 Jan 2019 14:54:35 +0000 (15:54 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 5 Feb 2019 13:12:10 +0000 (14:12 +0100)
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.

47 files changed:
UPGRADING
Zend/tests/bug29890.phpt
Zend/tests/bug29896.phpt
Zend/tests/bug35017.phpt
Zend/tests/bug41209.phpt
Zend/tests/bug45805.phpt
Zend/tests/bug48004.phpt
Zend/tests/bug51394.phpt
Zend/tests/bug60909_1.phpt
Zend/tests/bug61767.phpt
Zend/tests/bug64960.phpt
Zend/tests/bug69388.phpt
Zend/tests/bug69388_2.phpt
Zend/tests/bug72057.phpt
Zend/tests/bug72101.phpt
Zend/tests/bug76025.phpt
Zend/tests/bug76534.phpt
Zend/tests/nowdoc_015.phpt
Zend/zend.c
ext/iconv/tests/iconv_mime_decode.phpt
ext/iconv/tests/iconv_mime_encode.phpt
ext/iconv/tests/iconv_strpos.phpt
ext/iconv/tests/iconv_strrpos.phpt
ext/mbstring/tests/common.inc
ext/mbstring/tests/mb_substitute_character_variation1.phpt
ext/posix/tests/posix_ttyname_variation6.phpt
ext/spl/tests/class_implements_variation1.phpt
ext/spl/tests/class_uses_variation1.phpt
ext/standard/tests/array/array_diff_uassoc_variation14.phpt
ext/standard/tests/array/array_diff_ukey_variation11.phpt
ext/standard/tests/array/array_intersect_uassoc_variation11.phpt
ext/standard/tests/array/array_intersect_ukey_variation10.phpt
ext/standard/tests/array/array_multisort_variation1.phpt
ext/standard/tests/array/array_multisort_variation2.phpt
ext/standard/tests/array/array_multisort_variation3.phpt
ext/standard/tests/array/array_multisort_variation8.phpt
ext/standard/tests/class_object/get_class_methods_variation_001.phpt
ext/standard/tests/class_object/get_parent_class_variation_002.phpt
ext/standard/tests/class_object/is_subclass_of_variation_001.phpt
ext/standard/tests/class_object/is_subclass_of_variation_004.phpt
ext/standard/tests/class_object/method_exists_variation_001.phpt
ext/standard/tests/file/file_put_contents_variation2.phpt
ext/standard/tests/file/file_put_contents_variation3.phpt
ext/standard/tests/general_functions/intval_variation1.phpt
ext/standard/tests/image/getimagesize_variation2.phpt
tests/classes/tostring_004.phpt
tests/lang/bug25547.phpt

index a4b390f5f7e979eeb89d74587ae3822c1245075a..b7da98efea9ec656637cea157f0598e03760d686 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -34,6 +34,7 @@ PHP 8.0 UPGRADE NOTES
     interpreted as strings.
   . Removed ability to specify an autoloader using an __autoload() function.
     spl_autoload_register() should be used instead.
+  . Removed the $errcontext argument for custom error handlers.
   . Removed create_function(). Anonymous functions may be used instead.
   . Removed each(). foreach or ArrayIterator should be used instead.
   . Removed ability to unbind $this from closures that were created from a
index 1fdcdc4291336363f361d48fab2f5072e23bbada..6f1e874882e620f8c0747af570af7551a6735004 100644 (file)
@@ -2,7 +2,7 @@
 Bug #29890 (crash if error handler fails)
 --FILE--
 <?php
-function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine,$fClass) {
+function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine) {
 echo "error :".$fErrStr."\n";
 }
 
index 35a92d459c68cb047da1aaa71db1d265c1648730..d6ae8e7f7f49ba76a84e1dce25a3883e0e3928b4 100644 (file)
@@ -2,7 +2,7 @@
 Bug #29896 (Backtrace argument list out of sync)
 --FILE--
 <?php
-function userErrorHandler($num, $msg, $file, $line, $vars)
+function userErrorHandler($num, $msg, $file, $line)
 {
     debug_print_backtrace();
 }
@@ -22,6 +22,6 @@ function GenerateError2($A1)
 GenerateError2("Test2");
 ?>
 --EXPECTF--
-#0  userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11, Array ([A1] => Test1)) called at [%sbug29896.php:11]
+#0  userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11) called at [%sbug29896.php:11]
 #1  GenerateError1(Test1) called at [%sbug29896.php:16]
 #2  GenerateError2(Test2) called at [%sbug29896.php:19]
index 9944df55e026edf27b6da71abbafa7c3a2f2f055..8a747be7e15951964787e89845df52330f0d7ded 100644 (file)
@@ -13,7 +13,7 @@ try {
 } catch(Exception $e) {
   echo "This Exception should be caught\n";
 }
-function errorHandler($errno, $errstr, $errfile, $errline, $vars) {
+function errorHandler($errno, $errstr, $errfile, $errline) {
        throw new Exception('Some Exception');
 }
 ?>
index 3924f99ac85ece7e075346409d14d8f8f8ed73cf..f61df73d20a6aac4197c8608198d7f5c44b63ea9 100644 (file)
@@ -41,6 +41,6 @@ echo "Done\n";
 --EXPECTF--
 Fatal error: Uncaught ErrorException: Undefined variable: id in %s:%d
 Stack trace:
-#0 %s(%d): env::errorHandler(8, '%s', '%s', 34, Array)
+#0 %s(%d): env::errorHandler(8, '%s', '%s', 34)
 #1 {main}
   thrown in %s on line %d
index d63e658868a5cf91ad93527db34b25062205a655..86cea70373190e4d8e75595ce19feea2dece22bf 100644 (file)
@@ -38,7 +38,7 @@ $o->bar();
 --EXPECTF--
 Fatal error: Uncaught RuntimeException in %sbug45805.php:%d
 Stack trace:
-#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(8, 'Only variables ...', '%s', %d, Array)
+#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(8, 'Only variables ...', '%s', %d)
 #1 [internal function]: B->foo()
 #2 %sbug45805.php(%d): ReflectionMethod->invoke(Object(B))
 #3 %sbug45805.php(%d): B->bar()
index 5968876520b9d22aa08f5d9aea84bad1b6f1b5da..c8dd0b388024c8fae0a33aaeea52ee64dd50d120 100644 (file)
@@ -2,7 +2,7 @@
 Bug #48004 (Error handler prevents creation of default object)
 --FILE--
 <?php
-function error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
+function error_handler($errno, $errstr, $errfile, $errline) {
         return true;
 }
 
index e2d260b2b24021db8ab3a7646fe545ee10741b27..f91d2720a152973de78117848c57b2498216c205 100644 (file)
@@ -15,6 +15,6 @@ $a = $empty($b);
 --EXPECTF--
 Fatal error: Uncaught Exception: error! in %sbug51394.php:%d
 Stack trace:
-#0 %sbug51394.php(%d): eh(8, 'Undefined varia%s', '%s', %d, Array)
+#0 %sbug51394.php(%d): eh(8, 'Undefined varia%s', '%s', %d)
 #1 {main}
   thrown in %sbug51394.php on line %d
index e4c07face1c5fc70de3d58c3d4d03f0613c01923..d674490302a8d7056c3ae829af86337378a7bbab 100644 (file)
@@ -13,7 +13,7 @@ require 'notfound.php';
 error(require(notfound.php): failed to open stream: %s)
 Warning: Uncaught Exception: Foo in %sbug60909_1.php:5
 Stack trace:
-#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8, Array)
+#0 %sbug60909_1.php(8): {closure}(2, 'require(notfoun...', '%s', 8)
 #1 %sbug60909_1.php(8): require()
 #2 {main}
   thrown in %sbug60909_1.php on line 5
index 5e949706e8bab3c7f6315ffa1b3ec8445a37beea..3bc1e49d09a3530f0db5eebb3358bd46813b359d 100644 (file)
@@ -19,7 +19,7 @@ Error handler called (Undefined variable: undefined)
 
 Fatal error: Uncaught ErrorException: Undefined variable: undefined in %sbug61767.php:%d
 Stack trace:
-#0 %sbug61767.php(%d): {closure}(%s, 'Undefined varia...', '%s', %d, Array)
+#0 %sbug61767.php(%d): {closure}(%s, 'Undefined varia...', '%s', %d)
 #1 {main}
   thrown in %sbug61767.php on line %d
 Shutting down
index 52af0bbe3225d741151138a41330b47d0c6070a7..4ee40426172a56c94ab6741aa8f8caa5240024f7 100644 (file)
@@ -33,7 +33,7 @@ Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete o
 
 Fatal error: Uncaught Exception in %sbug64960.php:19
 Stack trace:
-#0 [internal function]: {closure}(8, 'ob_end_clean():...', '%s', 9, Array)
+#0 [internal function]: {closure}(8, 'ob_end_clean():...', '%s', 9)
 #1 %sbug64960.php(9): ob_end_clean()
 #2 [internal function]: ExceptionHandler->__invoke(Object(Exception))
 #3 {main}
index bf0c0a3c39c79742fc49a7a77a2dad0775b620c8..3846cca4cafa0e78849dde9dc2c342fb78d34c16 100644 (file)
@@ -3,7 +3,7 @@ Bug #69388: Use after free on recursive calls to PHP compiler
 --FILE--
 <?php
 
-function handle_error($code, $message, $file, $line, $context) {
+function handle_error($code, $message, $file, $line) {
        if (!function_exists("bla")) {
                eval('function bla($s) {echo "$s\n";}');
        }
index b55153b492e808f787142e9641e77ca5e12dee81..40b14e02577f71a8ea881528c898b04644c3169c 100644 (file)
@@ -2,7 +2,7 @@
 Bug #69388 - Variation
 --FILE--
 <?php
-function handle_error($code, $message, $file, $line, $context) {
+function handle_error($code, $message, $file, $line) {
     eval('namespace Foo;');
     echo "$message\n";
 }
index 406efe3efc8ecdb35e54770bfffa35e481c52cae..a518d829480bde4ce1aab7ac8bbdc3a8b5fccad5 100644 (file)
@@ -13,7 +13,7 @@ set_error_handler(
 --EXPECTF--
 Fatal error: Uncaught Exception: My custom error in %s:%d
 Stack trace:
-#0 %s(%d): {closure}(8, 'A non well form...', '%s', %d, Array)
+#0 %s(%d): {closure}(8, 'A non well form...', '%s', %d)
 #1 %s(%d): {closure}('7as')
 #2 {main}
   thrown in %s on line %d
index 808627be3b3aef7b1182eb3e9ea68ec983c656b3..23861958fdc15fb5004601d6fbd41c51205eb9f9 100644 (file)
@@ -76,7 +76,7 @@ $foo->bar($a, $b, $c);
 --EXPECTF--
 Fatal error: Uncaught Error: Class 'DoesNotExists' not found in %sbug72101.php:61
 Stack trace:
-#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8, Array)
+#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8)
 #1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
 #2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static))
 #3 %sbug72101.php(52): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
index 2619984d1e34b1f2d3dc9ccdbcdbfbbfe9122f7e..c7958bd60e90f1cde6872b1c663b1d1cfa8e80fb 100644 (file)
@@ -13,6 +13,6 @@ $c = $b[$a];
 --EXPECTF--
 Fatal error: Uncaught Exception: blah in %sbug76025.php:%d
 Stack trace:
-#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d, Array)
+#0 %sbug76025.php(%d): handleError(8, 'Undefined varia...', '%s', %d)
 #1 {main}
   thrown in %sbug76025.php on line %d
index 956a29ba2c2fdd59dab9c2630100d31e7051f108..457d09f400381661edf64eb05de2a7e243c43bce 100644 (file)
@@ -12,6 +12,6 @@ $y = &$x["bar"];
 --EXPECTF--
 Fatal error: Uncaught Exception: Illegal string offset 'bar' in %sbug76534.php:%d
 Stack trace:
-#0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d, Array)
+#0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d)
 #1 {main}
   thrown in %sbug76534.php on line %d
index 9eb83bd063b2c7876368884c46bb84a985638ebd..56de362dd5dc9702f20deff55aecaddb269be769 100644 (file)
@@ -2,7 +2,7 @@
 Test nowdoc and line numbering
 --FILE--
 <?php
-function error_handler($num, $msg, $file, $line, $vars) {
+function error_handler($num, $msg, $file, $line) {
        echo $line,"\n";
 }
 set_error_handler('error_handler');
index 6dc1c9c4cccb0ee060c684384f4969a709baedcf..560badd0c5cd86ea791392346d9dae79bc4722c1 100644 (file)
@@ -1246,7 +1246,7 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
        va_list args;
 #endif
        va_list usr_copy;
-       zval params[5];
+       zval params[4];
        zval retval;
        const char *error_filename;
        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
        zend_class_entry *saved_class_entry;
        zend_stack loop_var_stack;
        zend_stack delayed_oplines_stack;
-       zend_array *symbol_table;
        zend_class_entry *orig_fake_scope;
 
        /* 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
 
                        ZVAL_LONG(&params[3], error_lineno);
 
-                       symbol_table = zend_rebuild_symbol_table();
-
-                       /* during shutdown the symbol table table can be still null */
-                       if (!symbol_table) {
-                               ZVAL_NULL(&params[4]);
-                       } else {
-                               ZVAL_ARR(&params[4], zend_array_dup(symbol_table));
-                       }
-
                        ZVAL_COPY_VALUE(&orig_user_error_handler, &EG(user_error_handler));
                        ZVAL_UNDEF(&EG(user_error_handler));
 
@@ -1414,7 +1404,7 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
                        orig_fake_scope = EG(fake_scope);
                        EG(fake_scope) = NULL;
 
-                       if (call_user_function(CG(function_table), NULL, &orig_user_error_handler, &retval, 5, params) == SUCCESS) {
+                       if (call_user_function(CG(function_table), NULL, &orig_user_error_handler, &retval, 4, params) == SUCCESS) {
                                if (Z_TYPE(retval) != IS_UNDEF) {
                                        if (Z_TYPE(retval) == IS_FALSE) {
                                                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
                                CG(in_compilation) = 1;
                        }
 
-                       zval_ptr_dtor(&params[4]);
                        zval_ptr_dtor(&params[2]);
                        zval_ptr_dtor(&params[1]);
 
index c5b76f3ce9e8fe4fa81b0e5b75311c3614a90280..b5dee827dfa1401547fce5688c5ebbdf12a8798f 100644 (file)
@@ -6,7 +6,7 @@ iconv_mime_decode()
 iconv.internal_charset=iso-8859-1
 --FILE--
 <?php
-function my_error_handler($errno, $errmsg, $filename, $linenum, $vars)
+function my_error_handler($errno, $errmsg, $filename, $linenum)
 {
        echo "$errno: $errmsg\n";
 }
index bd090e4d50c2edcb5aec42ba8e06d56925a216c1..e4be7999159d639206d989f51740fffd49eb5ae5 100644 (file)
@@ -6,7 +6,7 @@ iconv_mime_encode()
 iconv.internal_charset=iso-8859-1
 --FILE--
 <?php
-function my_error_handler($errno, $errmsg, $filename, $linenum, $vars)
+function my_error_handler($errno, $errmsg, $filename, $linenum)
 {
        echo "$errno: $errmsg\n";
 }
index 28e3fe2320a497fb3385b4e82102f0ea570feff2..92492c7244af37c1bc67ac87fdef6e5335cb8dbc 100644 (file)
@@ -6,7 +6,7 @@ iconv_strpos()
 iconv.internal_charset=ISO-8859-1
 --FILE--
 <?php
-function my_error_handler($errno, $errmsg, $filename, $linenum, $vars)
+function my_error_handler($errno, $errmsg, $filename, $linenum)
 {
        echo "$errno: $errmsg\n";
 }
index ee977f2c31388d01f297c3116294b80bbce67ecf..76b8323d89893f4cd390544447346bd254bd4476 100644 (file)
@@ -6,7 +6,7 @@ iconv_strrpos()
 iconv.internal_charset=ISO-8859-1
 --FILE--
 <?php
-function my_error_handler($errno, $errmsg, $filename, $linenum, $vars)
+function my_error_handler($errno, $errmsg, $filename, $linenum)
 {
        echo "$errno: $errmsg\n";
 }
index adccb0ab7357a85fde63d7ee71a3bda12a351a9b..5f8a9c13d54ab5c1eeb15899eb59f16917364d6c 100644 (file)
@@ -4,7 +4,7 @@
  */
 
 // Custom Error Hanlder for testing
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        global $debug;
 
        $err_type = array (
index f738876469fcd06dbf9d96c40db0c6a7e28c7845..68e1ad7ca89ba1ee28c333f47ba171ed5e82143c 100644 (file)
@@ -16,7 +16,7 @@ function_exists('mb_substitute_character') or die("skip mb_substitute_character(
 echo "*** Testing mb_substitute_character() : usage variation ***\n";
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index eecae6769e2baad6aa10780417630f657e1b97c0..691c5eea7ee3a7833eed544734ff6d2d45e0b9ab 100644 (file)
@@ -18,7 +18,7 @@ echo "*** Test substituting argument 1 with object values ***\n";
 
 
 
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
         if (error_reporting() != 0) {
                 // report non-silenced errors
                 echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index 9d876d3a3611e65b8ff3fb484f22cf616c3287cc..8b122a79f1525da4d32a712ff1cfeedf1d50838d 100644 (file)
@@ -12,7 +12,7 @@ echo "*** Testing class_implements() : variation ***\n";
 
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index be6aa9ac7f25debf257d519809ae21f3eb4d6d07..fbf476b493642c7a1704f9d22ff59198354ab9f9 100644 (file)
@@ -12,7 +12,7 @@ echo "*** Testing class_uses() : variation ***\n";
 
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index eff559e03ac671eadb4496025423c190f835d6bd..97a9d8a9d2b4b4476c2b6dec275bb2f2cca77f9c 100644 (file)
@@ -19,7 +19,7 @@ class classWithoutToString
 }
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index c759189aa013267c1fd17a2ff613d048a5b35edf..5c2859a78dad806fc85acfbef340e2d1eb34df16 100644 (file)
@@ -15,7 +15,7 @@ $array2 = array('blue'  => 1, 'red'  => 2, 'green'  => 3, 'purple' => 4);
 $array3 = array(1, 2, 3, 4, 5);
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
         if (error_reporting() != 0) {
                 // report non-silenced errors
                 echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index fe9a17983f44f86acf85060e748e227956d3df98..a39bac2e545f0717dcdc4b05c8fcf0ff46422f34 100644 (file)
@@ -14,7 +14,7 @@ $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
 $array2 = array("a" => "green", "yellow", "red");
 $array3 = array("a"=>"green", "brown");
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
         if (error_reporting() != 0) {
                 // report non-silenced errors
                 echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index ca70e5e78a0b9de2581a5340b644f3d595ae9e35..b5b6439be1ade3b046842cb11036de9000853e30 100644 (file)
@@ -15,7 +15,7 @@ $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan'   => 8);
 $array3 = array("a"=>"green", "cyan");
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
         if (error_reporting() != 0) {
                 // report non-silenced errors
                 echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index 9a33a270f1d8350767aea6f2da63af3f793fe5d1..4d7281b92b71d0045b6c35664adb26eafe648667 100644 (file)
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation
 echo "*** Testing array_multisort() : usage variation ***\n";
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index 8c26a8347be07ae834bd3b0374336aa58047ba71..994e27ecd04a77e5cf0575846eb6cf168c54e198 100644 (file)
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation
 echo "*** Testing array_multisort() : usage variation ***\n";
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index 28130e31fd2232fbbea42880b1551b32ac1a9501..5939b7bef994fc32691918b60ecca100824b27a6 100644 (file)
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation
 echo "*** Testing array_multisort() : usage variation ***\n";
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index 6d89dd0c6c0b312c05cc664ce00038ef91cdfa82..e6ff858b16cfd5c06d366765abe111beec378094 100644 (file)
@@ -11,7 +11,7 @@ Test array_multisort() function : usage variation - test sort order of all types
 echo "*** Testing array_multisort() : usage variation  - test sort order of all types***\n";
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        // We're testing sort order not errors so ignore.
 }
 set_error_handler('test_error_handler');
index 16a728e088f7e947551da26f579549b754510b30..f3ab471b1fb3024b7d69d8b4e7f11c6bebc5a8c2 100644 (file)
@@ -9,7 +9,7 @@ Test get_class_methods() function : usage variations  - unexpected types
  */
 
 
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        echo "Error: $err_no - $err_msg, $filename($linenum)\n";
 }
 set_error_handler('test_error_handler');
index 8dde525ae82e751d8439977565ecfaf9611c7889..d331e9a0d1aa9e32f8af2a304ad79c18c58f71a5 100644 (file)
@@ -12,7 +12,7 @@ spl_autoload_register(function ($className) {
        echo "In autoload($className)\n";
 });
 
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        echo "Error: $err_no - $err_msg, $filename($linenum)\n";
 }
 set_error_handler('test_error_handler');
index d65bfcbc26ba43daa018a775812901896e11ee07..e5456166677800f4e4297292d3c15edcbb7c51b9 100644 (file)
@@ -12,7 +12,7 @@ spl_autoload_register(function ($className) {
        echo "In autoload($className)\n";
 });
 
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        echo "Error: $err_no - $err_msg, $filename($linenum)\n";
 }
 set_error_handler('test_error_handler');
index 0a4c5752580d7cfa9bfe403762bfc11f9c141556..3e5447308b72f8600c8d01001e059a091ae773e1 100644 (file)
@@ -12,7 +12,7 @@ spl_autoload_register(function ($className) {
        echo "In autoload($className)\n";
 });
 
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        echo "Error: $err_no - $err_msg, $filename($linenum)\n";
 }
 set_error_handler('test_error_handler');
index 4accebe20af1eb8da144a7770a4add38f6d67166..93497c34b183281c89b427a0a984db6cea65417c 100644 (file)
@@ -12,7 +12,7 @@ spl_autoload_register(function ($className) {
        echo "In autoload($className)\n";
 });
 
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        echo "Error: $err_no - $err_msg, $filename($linenum)\n";
 }
 set_error_handler('test_error_handler');
index ae56486d5fea9dc53591db0b45941c59270665a6..1bf30340e4818e7a74b3d473f9710378cdea8159 100644 (file)
@@ -13,7 +13,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
 echo "*** Testing file_put_contents() : usage variation ***\n";
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index 74130007a72eea4da587f37cb3d6c17dfc7de93d..aaf18c077655846935fb6b6d4ab0300ab3e22668 100644 (file)
@@ -13,7 +13,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
 echo "*** Testing file_put_contents() : usage variation ***\n";
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index e76d7083d4d2832b645718b255a64e4f41c09d22..086161de6c327eb76f40c5e7ec83d4865931f9f9 100644 (file)
@@ -11,7 +11,7 @@ Test intval() function : usage variation
 echo "*** Testing intval() : usage variation ***\n";
 
 // Define error handler
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        if (error_reporting() != 0) {
                // report non-silenced errors
                echo "Error: $err_no - $err_msg, $filename($linenum)\n";
index eec2301c40e919d4165b8a7d77e2c4d85eaeb140..1bb515fe24f67a363f9a0cf3f470ec5f5f2fecb1 100644 (file)
@@ -8,7 +8,7 @@ Test getimagesize() function : usage variations  - unexpected type for arg 2
  * Alias to functions:
  */
 
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
        echo "Error: $err_no - $err_msg, $filename($linenum)\n";
 }
 set_error_handler('test_error_handler');
index 907f7bc306c527896f6afb99e1db23810a5b61c8..6029938f3288d6b7cdbc7107c8cac96e0afabb66 100644 (file)
@@ -2,7 +2,7 @@
 Object to string conversion: error cases and behaviour variations.
 --FILE--
 <?php
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
+function test_error_handler($err_no, $err_msg, $filename, $linenum) {
         echo "Error: $err_no - $err_msg\n";
 }
 set_error_handler('test_error_handler');
index b54f467ea8752ce8068724d3a86efff88d0c9adb..eae32e72237bad67ba9eeb4f52b8eb3d399396f0 100644 (file)
@@ -3,7 +3,7 @@ Bug #25547 (error_handler and array index with function call)
 --FILE--
 <?php
 
-function handler($errno, $errstr, $errfile, $errline, $context)
+function handler($errno, $errstr, $errfile, $errline)
 {
        echo __FUNCTION__ . "($errstr)\n";
 }