summaryrefslogtreecommitdiff
path: root/ext/posix
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-09-21 11:07:42 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-09-21 17:04:39 +0200
commitfb4554e431e4f4063917c1a80ad2e929e6768d0b (patch)
tree1441e0a2b1a68232eb3d970d80ac699d6ab49f62 /ext/posix
parentd60c43e397f45c3c92e2a980aa8bee2235bff8be (diff)
downloadphp-git-fb4554e431e4f4063917c1a80ad2e929e6768d0b.tar.gz
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.
Diffstat (limited to 'ext/posix')
-rw-r--r--ext/posix/tests/posix_ttyname_variation6.phpt18
1 files changed, 4 insertions, 14 deletions
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)