mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Revert "Don't silence fatal errors with @"
This reverts commit abd36289e2
.
This wasn't ready for merging yet, there are still some test
failures.
This commit is contained in:
parent
abd36289e2
commit
340c6d3927
50 changed files with 54 additions and 68 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue