From fb4554e431e4f4063917c1a80ad2e929e6768d0b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 11:07:42 +0200 Subject: Throw warning for failed object to int/float conversion We previously couldn't increase the error level here because it was coupled to comparison handling. This is no longer the case in PHP 8. --- ext/posix/tests/posix_ttyname_variation6.phpt | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'ext/posix') diff --git a/ext/posix/tests/posix_ttyname_variation6.phpt b/ext/posix/tests/posix_ttyname_variation6.phpt index 691c5eea7e..4af6334b2f 100644 --- a/ext/posix/tests/posix_ttyname_variation6.phpt +++ b/ext/posix/tests/posix_ttyname_variation6.phpt @@ -16,18 +16,6 @@ if (!extension_loaded('posix')) { echo "*** Test substituting argument 1 with object values ***\n"; - - -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"; - } -} -set_error_handler('test_error_handler'); - - - class classWithToString { public function __toString() { @@ -51,7 +39,9 @@ foreach ( $variation_array as $var ) { ?> --EXPECTF-- *** Test substituting argument 1 with object values *** -Error: 8 - Object of class classWithToString could not be converted to int, %s(%d) + +Warning: Object of class classWithToString could not be converted to int in %s on line %d bool(false) -Error: 8 - Object of class classWithoutToString could not be converted to int, %s(%d) + +Warning: Object of class classWithoutToString could not be converted to int in %s on line %d bool(false) -- cgit v1.2.1