summaryrefslogtreecommitdiff
path: root/Zend/tests/add_003.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-12-25 13:18:45 +0100
committerNikita Popov <nikita.ppv@gmail.com>2017-12-26 12:39:06 +0100
commitb2b2b437af5495dcb2016be6e45567ed826cb87e (patch)
tree7cf17c011f6b9c272eebf184fa47d5c35f455b2f /Zend/tests/add_003.phpt
parentefcbea43455ca4e27ec6fc5ce2f3a740a981247e (diff)
downloadphp-git-b2b2b437af5495dcb2016be6e45567ed826cb87e.tar.gz
Add _IS_NUMBER as cast_object() target type
convert_scalar_to_number() will now call cast_object() with an _IS_NUMBER argument, in which case the cast handler should return either an integer or floating point number, whichever is more appropriate. Previously convert_scalar_to_number() unconditionally converted objects to integers instead. Fixes bug #53033. Fixes bug #54973. Fixes bug #73108.
Diffstat (limited to 'Zend/tests/add_003.phpt')
-rw-r--r--Zend/tests/add_003.phpt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/tests/add_003.phpt b/Zend/tests/add_003.phpt
index a3705479e2..cc2a0dd1a7 100644
--- a/Zend/tests/add_003.phpt
+++ b/Zend/tests/add_003.phpt
@@ -20,11 +20,11 @@ var_dump($c);
echo "Done\n";
?>
--EXPECTF--
-Notice: Object of class stdClass could not be converted to int in %sadd_003.php on line %d
+Notice: Object of class stdClass could not be converted to number in %sadd_003.php on line %d
Exception: Unsupported operand types
-Notice: Object of class stdClass could not be converted to int in %s on line %d
+Notice: Object of class stdClass could not be converted to number in %s on line %d
Fatal error: Uncaught Error: Unsupported operand types in %s:%d
Stack trace: