From 340c6d392720f4681a46b58cfe9a002ce5b7e8b6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 31 Jan 2019 09:39:10 +0100 Subject: [PATCH] Revert "Don't silence fatal errors with @" This reverts commit abd36289e26cc0365e82373699aba4c1ffff464d. This wasn't ready for merging yet, there are still some test failures. --- UPGRADING | 4 ---- Zend/tests/bug34786.phpt | 6 +++--- Zend/zend_errors.h | 5 ----- Zend/zend_execute.c | 3 +-- Zend/zend_vm_def.h | 8 +++----- Zend/zend_vm_execute.h | 8 +++----- ext/standard/tests/array/array_multisort_variation1.phpt | 2 +- ext/standard/tests/array/array_multisort_variation2.phpt | 2 +- ext/standard/tests/array/array_multisort_variation3.phpt | 2 +- ext/standard/tests/file/basename_variation3.phpt | 2 +- ext/standard/tests/file/basename_variation4.phpt | 2 +- ext/standard/tests/file/chmod_variation3.phpt | 2 +- ext/standard/tests/file/chmod_variation4.phpt | 2 +- ext/standard/tests/file/dirname_variation1.phpt | 2 +- ext/standard/tests/file/file_get_contents_variation3.phpt | 2 +- ext/standard/tests/file/file_get_contents_variation4.phpt | 2 +- .../tests/file/file_get_contents_variation5_64bit.phpt | 2 +- ext/standard/tests/file/file_get_contents_variation6.phpt | 2 +- ext/standard/tests/file/file_put_contents_variation2.phpt | 2 +- ext/standard/tests/file/file_put_contents_variation3.phpt | 2 +- ext/standard/tests/file/file_variation2.phpt | 2 +- ext/standard/tests/file/file_variation3.phpt | 2 +- ext/standard/tests/file/file_variation4.phpt | 2 +- ext/standard/tests/file/fopen_variation3.phpt | 2 +- ext/standard/tests/file/fopen_variation4.phpt | 2 +- ext/standard/tests/file/fwrite_variation5.phpt | 2 +- ext/standard/tests/file/mkdir_variation1.phpt | 2 +- ext/standard/tests/file/mkdir_variation2.phpt | 2 +- ext/standard/tests/file/mkdir_variation3.phpt | 2 +- ext/standard/tests/file/mkdir_variation4.phpt | 2 +- ext/standard/tests/file/parse_ini_file_variation4.phpt | 2 +- ext/standard/tests/file/parse_ini_file_variation5.phpt | 2 +- ext/standard/tests/file/pathinfo_variation1.phpt | 2 +- ext/standard/tests/file/pathinfo_variation2.phpt | 2 +- ext/standard/tests/file/pclose_variation1.phpt | 2 +- ext/standard/tests/file/readfile_variation4.phpt | 2 +- ext/standard/tests/file/readfile_variation5.phpt | 2 +- ext/standard/tests/file/rename_variation10.phpt | 2 +- ext/standard/tests/file/rmdir_variation1.phpt | 2 +- ext/standard/tests/file/rmdir_variation2.phpt | 2 +- ext/standard/tests/file/touch_variation3.phpt | 2 +- ext/standard/tests/file/touch_variation4.phpt | 2 +- ext/standard/tests/file/umask_variation3.phpt | 2 +- ext/standard/tests/file/unlink_variation7.phpt | 2 +- .../call_user_func_array_variation_002.phpt | 2 +- .../call_user_func_array_variation_003.phpt | 2 +- .../tests/general_functions/intval_variation1.phpt | 2 +- ext/standard/tests/network/ip2long_variation1.phpt | 2 +- ext/standard/tests/network/long2ip_variation1.phpt | 2 +- tests/output/ob_implicit_flush_variation_001.phpt | 2 +- 50 files changed, 54 insertions(+), 68 deletions(-) diff --git a/UPGRADING b/UPGRADING index a063b91fdbe..c735b4d521a 100644 --- a/UPGRADING +++ b/UPGRADING @@ -25,10 +25,6 @@ PHP 7.4 UPGRADE NOTES . Referencing parent:: inside a class that does not have a parent will now generate a compile-time error. Previously the error was only emitted at run-time. - . Supressing errors of type E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, - E_USER_ERROR, E_RECOVERABLE_ERROR, E_PARSE with the @ operator is no - longer supported. They may still be suppressed with error_reporting - or configuration. - Curl: . Attempting to serialize a CURLFile class will now generate an exception. diff --git a/Zend/tests/bug34786.phpt b/Zend/tests/bug34786.phpt index ef0627633fc..18642848d84 100644 --- a/Zend/tests/bug34786.phpt +++ b/Zend/tests/bug34786.phpt @@ -10,13 +10,13 @@ function bar() { echo "bar: ".error_reporting()."\n"; } -error_reporting(E_WARNING); +error_reporting(1); echo "before: ".error_reporting()."\n"; @foo(1,@bar(),3); echo "after: ".error_reporting()."\n"; ?> --EXPECT-- -before: 2 +before: 1 bar: 0 foo: 0 -after: 2 +after: 1 diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h index ac48ef60ad0..9932b1e47ef 100644 --- a/Zend/zend_errors.h +++ b/Zend/zend_errors.h @@ -39,11 +39,6 @@ #define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED | E_STRICT) #define E_CORE (E_CORE_ERROR | E_CORE_WARNING) -/* Fatal errors that are ignored by the silence operator */ -#define E_FATAL_ERRORS (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE) - -#define E_HAS_ONLY_FATAL_ERRORS(mask) !((mask) & ~E_FATAL_ERRORS) - #endif /* ZEND_ERRORS_H */ /* diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 03c621f08f2..2b832b6f0dc 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3755,8 +3755,7 @@ static void cleanup_live_vars(zend_execute_data *execute_data, uint32_t op_num, } } else if (kind == ZEND_LIVE_SILENCE) { /* restore previous error_reporting value */ - if (E_HAS_ONLY_FATAL_ERRORS(EG(error_reporting)) - && !E_HAS_ONLY_FATAL_ERRORS(Z_LVAL_P(var))) { + if (!EG(error_reporting) && Z_LVAL_P(var) != 0) { EG(error_reporting) = Z_LVAL_P(var); } } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 8d6c972b9c9..060c4bf6fe4 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -6690,10 +6690,9 @@ ZEND_VM_HANDLER(57, ZEND_BEGIN_SILENCE, ANY, ANY) ZVAL_LONG(EX_VAR(opline->result.var), EG(error_reporting)); - if (!E_HAS_ONLY_FATAL_ERRORS(EG(error_reporting))) { + if (EG(error_reporting)) { do { - /* Do not silence fatal errors */ - EG(error_reporting) &= E_FATAL_ERRORS; + EG(error_reporting) = 0; if (!EG(error_reporting_ini_entry)) { zval *zv = zend_hash_find_ex(EG(ini_directives), ZSTR_KNOWN(ZEND_STR_ERROR_REPORTING), 1); if (zv) { @@ -6722,8 +6721,7 @@ ZEND_VM_HANDLER(58, ZEND_END_SILENCE, TMP, ANY) { USE_OPLINE - if (E_HAS_ONLY_FATAL_ERRORS(EG(error_reporting)) - && !E_HAS_ONLY_FATAL_ERRORS(Z_LVAL_P(EX_VAR(opline->op1.var)))) { + if (!EG(error_reporting) && Z_LVAL_P(EX_VAR(opline->op1.var)) != 0) { EG(error_reporting) = Z_LVAL_P(EX_VAR(opline->op1.var)); } ZEND_VM_NEXT_OPCODE(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 7e9ef62effb..d8258c9783f 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1523,10 +1523,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEN ZVAL_LONG(EX_VAR(opline->result.var), EG(error_reporting)); - if (!E_HAS_ONLY_FATAL_ERRORS(EG(error_reporting))) { + if (EG(error_reporting)) { do { - /* Do not silence fatal errors */ - EG(error_reporting) &= E_FATAL_ERRORS; + EG(error_reporting) = 0; if (!EG(error_reporting_ini_entry)) { zval *zv = zend_hash_find_ex(EG(ini_directives), ZSTR_KNOWN(ZEND_STR_ERROR_REPORTING), 1); if (zv) { @@ -19505,8 +19504,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_END_SILENCE_SPEC_TMP_HANDLER(Z { USE_OPLINE - if (E_HAS_ONLY_FATAL_ERRORS(EG(error_reporting)) - && !E_HAS_ONLY_FATAL_ERRORS(Z_LVAL_P(EX_VAR(opline->op1.var)))) { + if (!EG(error_reporting) && Z_LVAL_P(EX_VAR(opline->op1.var)) != 0) { EG(error_reporting) = Z_LVAL_P(EX_VAR(opline->op1.var)); } ZEND_VM_NEXT_OPCODE(); diff --git a/ext/standard/tests/array/array_multisort_variation1.phpt b/ext/standard/tests/array/array_multisort_variation1.phpt index f8d012b3957..9a33a270f1d 100644 --- a/ext/standard/tests/array/array_multisort_variation1.phpt +++ b/ext/standard/tests/array/array_multisort_variation1.phpt @@ -12,7 +12,7 @@ echo "*** Testing array_multisort() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/array/array_multisort_variation2.phpt b/ext/standard/tests/array/array_multisort_variation2.phpt index ca5c08940c0..8c26a8347be 100644 --- a/ext/standard/tests/array/array_multisort_variation2.phpt +++ b/ext/standard/tests/array/array_multisort_variation2.phpt @@ -12,7 +12,7 @@ echo "*** Testing array_multisort() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/array/array_multisort_variation3.phpt b/ext/standard/tests/array/array_multisort_variation3.phpt index a13755e4059..28130e31fd2 100644 --- a/ext/standard/tests/array/array_multisort_variation3.phpt +++ b/ext/standard/tests/array/array_multisort_variation3.phpt @@ -12,7 +12,7 @@ echo "*** Testing array_multisort() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/basename_variation3.phpt b/ext/standard/tests/file/basename_variation3.phpt index ee3395bc841..684e538d768 100644 --- a/ext/standard/tests/file/basename_variation3.phpt +++ b/ext/standard/tests/file/basename_variation3.phpt @@ -12,7 +12,7 @@ echo "*** Testing basename() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/basename_variation4.phpt b/ext/standard/tests/file/basename_variation4.phpt index 12852a32611..2bb94870dfe 100644 --- a/ext/standard/tests/file/basename_variation4.phpt +++ b/ext/standard/tests/file/basename_variation4.phpt @@ -12,7 +12,7 @@ echo "*** Testing basename() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/chmod_variation3.phpt b/ext/standard/tests/file/chmod_variation3.phpt index dcb7fc3bbb6..bc6f0dc8600 100644 --- a/ext/standard/tests/file/chmod_variation3.phpt +++ b/ext/standard/tests/file/chmod_variation3.phpt @@ -12,7 +12,7 @@ echo "*** Testing chmod() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/chmod_variation4.phpt b/ext/standard/tests/file/chmod_variation4.phpt index cd04e489282..e0da9f66ee3 100644 --- a/ext/standard/tests/file/chmod_variation4.phpt +++ b/ext/standard/tests/file/chmod_variation4.phpt @@ -14,7 +14,7 @@ echo "*** Testing chmod() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/dirname_variation1.phpt b/ext/standard/tests/file/dirname_variation1.phpt index 339f63b9f48..5e97982a9a6 100644 --- a/ext/standard/tests/file/dirname_variation1.phpt +++ b/ext/standard/tests/file/dirname_variation1.phpt @@ -14,7 +14,7 @@ echo "*** Testing dirname() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_get_contents_variation3.phpt b/ext/standard/tests/file/file_get_contents_variation3.phpt index 81413b1fcd9..9e8de27f3f8 100644 --- a/ext/standard/tests/file/file_get_contents_variation3.phpt +++ b/ext/standard/tests/file/file_get_contents_variation3.phpt @@ -14,7 +14,7 @@ echo "*** Testing file_get_contents() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_get_contents_variation4.phpt b/ext/standard/tests/file/file_get_contents_variation4.phpt index 041d81220fb..0ca7a6bf20a 100644 --- a/ext/standard/tests/file/file_get_contents_variation4.phpt +++ b/ext/standard/tests/file/file_get_contents_variation4.phpt @@ -14,7 +14,7 @@ echo "*** Testing file_get_contents() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt b/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt index 104ad6e6d7a..d0b74757d20 100644 --- a/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt +++ b/ext/standard/tests/file/file_get_contents_variation5_64bit.phpt @@ -16,7 +16,7 @@ echo "*** Testing file_get_contents() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_get_contents_variation6.phpt b/ext/standard/tests/file/file_get_contents_variation6.phpt index 1a547c5fa4d..f30cac10d21 100644 --- a/ext/standard/tests/file/file_get_contents_variation6.phpt +++ b/ext/standard/tests/file/file_get_contents_variation6.phpt @@ -14,7 +14,7 @@ echo "*** Testing file_get_contents() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_put_contents_variation2.phpt b/ext/standard/tests/file/file_put_contents_variation2.phpt index 1d5fd989465..ae56486d5fe 100644 --- a/ext/standard/tests/file/file_put_contents_variation2.phpt +++ b/ext/standard/tests/file/file_put_contents_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing file_put_contents() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_put_contents_variation3.phpt b/ext/standard/tests/file/file_put_contents_variation3.phpt index 5808fd37c79..74130007a72 100644 --- a/ext/standard/tests/file/file_put_contents_variation3.phpt +++ b/ext/standard/tests/file/file_put_contents_variation3.phpt @@ -14,7 +14,7 @@ echo "*** Testing file_put_contents() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_variation2.phpt b/ext/standard/tests/file/file_variation2.phpt index 6f8619d74fc..9c3ad0e546b 100644 --- a/ext/standard/tests/file/file_variation2.phpt +++ b/ext/standard/tests/file/file_variation2.phpt @@ -12,7 +12,7 @@ echo "*** Testing file() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_variation3.phpt b/ext/standard/tests/file/file_variation3.phpt index 81348cac929..014adec6d8d 100644 --- a/ext/standard/tests/file/file_variation3.phpt +++ b/ext/standard/tests/file/file_variation3.phpt @@ -14,7 +14,7 @@ echo "*** Testing file() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/file_variation4.phpt b/ext/standard/tests/file/file_variation4.phpt index 7a8a120223c..103c2b0af62 100644 --- a/ext/standard/tests/file/file_variation4.phpt +++ b/ext/standard/tests/file/file_variation4.phpt @@ -12,7 +12,7 @@ echo "*** Testing file() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/fopen_variation3.phpt b/ext/standard/tests/file/fopen_variation3.phpt index a714cd7000d..fb00b243fc6 100644 --- a/ext/standard/tests/file/fopen_variation3.phpt +++ b/ext/standard/tests/file/fopen_variation3.phpt @@ -14,7 +14,7 @@ echo "*** Testing fopen() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/fopen_variation4.phpt b/ext/standard/tests/file/fopen_variation4.phpt index f18d70a630a..15f9e60c5a3 100644 --- a/ext/standard/tests/file/fopen_variation4.phpt +++ b/ext/standard/tests/file/fopen_variation4.phpt @@ -14,7 +14,7 @@ echo "*** Testing fopen() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/fwrite_variation5.phpt b/ext/standard/tests/file/fwrite_variation5.phpt index b0151e921d5..ff1214c5270 100644 --- a/ext/standard/tests/file/fwrite_variation5.phpt +++ b/ext/standard/tests/file/fwrite_variation5.phpt @@ -14,7 +14,7 @@ echo "*** Testing fwrite() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/mkdir_variation1.phpt b/ext/standard/tests/file/mkdir_variation1.phpt index 85ec358b075..c77c66b5312 100644 --- a/ext/standard/tests/file/mkdir_variation1.phpt +++ b/ext/standard/tests/file/mkdir_variation1.phpt @@ -19,7 +19,7 @@ echo "*** Testing mkdir() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/mkdir_variation2.phpt b/ext/standard/tests/file/mkdir_variation2.phpt index 7ff3774d66d..51a1c39c176 100644 --- a/ext/standard/tests/file/mkdir_variation2.phpt +++ b/ext/standard/tests/file/mkdir_variation2.phpt @@ -16,7 +16,7 @@ echo "*** Testing mkdir() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/mkdir_variation3.phpt b/ext/standard/tests/file/mkdir_variation3.phpt index 114d7b0355e..4c037b6bcab 100644 --- a/ext/standard/tests/file/mkdir_variation3.phpt +++ b/ext/standard/tests/file/mkdir_variation3.phpt @@ -14,7 +14,7 @@ echo "*** Testing mkdir() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/mkdir_variation4.phpt b/ext/standard/tests/file/mkdir_variation4.phpt index 9aedc0c7c9b..a31ae722c68 100644 --- a/ext/standard/tests/file/mkdir_variation4.phpt +++ b/ext/standard/tests/file/mkdir_variation4.phpt @@ -14,7 +14,7 @@ echo "*** Testing mkdir() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/parse_ini_file_variation4.phpt b/ext/standard/tests/file/parse_ini_file_variation4.phpt index 2c8a80becf3..15acc9c3c5a 100644 --- a/ext/standard/tests/file/parse_ini_file_variation4.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation4.phpt @@ -14,7 +14,7 @@ echo "*** Testing parse_ini_file() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/parse_ini_file_variation5.phpt b/ext/standard/tests/file/parse_ini_file_variation5.phpt index 166fa09c8ca..4cfc2a661f4 100644 --- a/ext/standard/tests/file/parse_ini_file_variation5.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation5.phpt @@ -14,7 +14,7 @@ echo "*** Testing parse_ini_file() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/pathinfo_variation1.phpt b/ext/standard/tests/file/pathinfo_variation1.phpt index 2170491023c..36d9bab5ae3 100644 --- a/ext/standard/tests/file/pathinfo_variation1.phpt +++ b/ext/standard/tests/file/pathinfo_variation1.phpt @@ -14,7 +14,7 @@ echo "*** Testing pathinfo() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/pathinfo_variation2.phpt b/ext/standard/tests/file/pathinfo_variation2.phpt index 265364e48f9..a39543b18ff 100644 --- a/ext/standard/tests/file/pathinfo_variation2.phpt +++ b/ext/standard/tests/file/pathinfo_variation2.phpt @@ -16,7 +16,7 @@ echo "*** Testing pathinfo() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/pclose_variation1.phpt b/ext/standard/tests/file/pclose_variation1.phpt index c328534c65e..7c22389646e 100644 --- a/ext/standard/tests/file/pclose_variation1.phpt +++ b/ext/standard/tests/file/pclose_variation1.phpt @@ -14,7 +14,7 @@ echo "*** Testing pclose() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/readfile_variation4.phpt b/ext/standard/tests/file/readfile_variation4.phpt index e9378bee904..99ee79e40ba 100644 --- a/ext/standard/tests/file/readfile_variation4.phpt +++ b/ext/standard/tests/file/readfile_variation4.phpt @@ -14,7 +14,7 @@ echo "*** Testing readfile() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/readfile_variation5.phpt b/ext/standard/tests/file/readfile_variation5.phpt index d8cecbd14c3..bc9c0640551 100644 --- a/ext/standard/tests/file/readfile_variation5.phpt +++ b/ext/standard/tests/file/readfile_variation5.phpt @@ -14,7 +14,7 @@ echo "*** Testing readfile() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/rename_variation10.phpt b/ext/standard/tests/file/rename_variation10.phpt index 62b156ae01a..8ee59168b10 100644 --- a/ext/standard/tests/file/rename_variation10.phpt +++ b/ext/standard/tests/file/rename_variation10.phpt @@ -14,7 +14,7 @@ echo "*** Testing rename() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/rmdir_variation1.phpt b/ext/standard/tests/file/rmdir_variation1.phpt index 5a802e5d2a5..0556266efab 100644 --- a/ext/standard/tests/file/rmdir_variation1.phpt +++ b/ext/standard/tests/file/rmdir_variation1.phpt @@ -19,7 +19,7 @@ echo "*** Testing rmdir() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/rmdir_variation2.phpt b/ext/standard/tests/file/rmdir_variation2.phpt index 4f57de7c48b..7555200344b 100644 --- a/ext/standard/tests/file/rmdir_variation2.phpt +++ b/ext/standard/tests/file/rmdir_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing rmdir() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/touch_variation3.phpt b/ext/standard/tests/file/touch_variation3.phpt index b6c7080a061..5eb6ad315ef 100644 --- a/ext/standard/tests/file/touch_variation3.phpt +++ b/ext/standard/tests/file/touch_variation3.phpt @@ -21,7 +21,7 @@ echo "*** Testing touch() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/touch_variation4.phpt b/ext/standard/tests/file/touch_variation4.phpt index 32d48fdb58c..190d0f4b1ab 100644 --- a/ext/standard/tests/file/touch_variation4.phpt +++ b/ext/standard/tests/file/touch_variation4.phpt @@ -21,7 +21,7 @@ echo "*** Testing touch() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/umask_variation3.phpt b/ext/standard/tests/file/umask_variation3.phpt index 9f07e09a60d..68996ab6927 100644 --- a/ext/standard/tests/file/umask_variation3.phpt +++ b/ext/standard/tests/file/umask_variation3.phpt @@ -21,7 +21,7 @@ echo "*** Testing umask() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/file/unlink_variation7.phpt b/ext/standard/tests/file/unlink_variation7.phpt index ff83a1d5480..b4a6bd5a1f9 100644 --- a/ext/standard/tests/file/unlink_variation7.phpt +++ b/ext/standard/tests/file/unlink_variation7.phpt @@ -14,7 +14,7 @@ echo "*** Testing unlink() : usage variation different types for context ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt index d26944c94bb..51a079ad53a 100644 --- a/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt +++ b/ext/standard/tests/general_functions/call_user_func_array_variation_002.phpt @@ -12,7 +12,7 @@ echo "*** Testing call_user_func_array() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt b/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt index 1cc957f6bb5..c8c8ce66048 100644 --- a/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt +++ b/ext/standard/tests/general_functions/call_user_func_array_variation_003.phpt @@ -12,7 +12,7 @@ echo "*** Testing call_user_func_array() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/general_functions/intval_variation1.phpt b/ext/standard/tests/general_functions/intval_variation1.phpt index 65592fa4ad6..e76d7083d4d 100644 --- a/ext/standard/tests/general_functions/intval_variation1.phpt +++ b/ext/standard/tests/general_functions/intval_variation1.phpt @@ -12,7 +12,7 @@ echo "*** Testing intval() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/network/ip2long_variation1.phpt b/ext/standard/tests/network/ip2long_variation1.phpt index 6b87f07e63b..fa7410930f3 100644 --- a/ext/standard/tests/network/ip2long_variation1.phpt +++ b/ext/standard/tests/network/ip2long_variation1.phpt @@ -12,7 +12,7 @@ echo "*** Testing ip2long() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/ext/standard/tests/network/long2ip_variation1.phpt b/ext/standard/tests/network/long2ip_variation1.phpt index aa3b8310ff8..93efc098b5f 100644 --- a/ext/standard/tests/network/long2ip_variation1.phpt +++ b/ext/standard/tests/network/long2ip_variation1.phpt @@ -17,7 +17,7 @@ echo "*** Testing long2ip() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } diff --git a/tests/output/ob_implicit_flush_variation_001.phpt b/tests/output/ob_implicit_flush_variation_001.phpt index 0677ba10afb..d6d3a45e016 100644 --- a/tests/output/ob_implicit_flush_variation_001.phpt +++ b/tests/output/ob_implicit_flush_variation_001.phpt @@ -14,7 +14,7 @@ echo "*** Testing ob_implicit_flush() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { - if (error_reporting() & $err_no) { + if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; }