mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
b2b2b437af
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.
13 lines
463 B
PHP
13 lines
463 B
PHP
--TEST--
|
|
Bug #73337 (try/catch not working with two exceptions inside a same operation)
|
|
--FILE--
|
|
<?php
|
|
class d { function __destruct() { throw new Exception; } }
|
|
try { new d + new d; } catch (Exception $e) { print "Exception properly caught\n"; }
|
|
?>
|
|
--EXPECTF--
|
|
Notice: Object of class d could not be converted to number in %sbug73337.php on line 3
|
|
|
|
Notice: Object of class d could not be converted to number in %sbug73337.php on line 3
|
|
Exception properly caught
|