mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
a31f46421d
RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
15 lines
358 B
PHP
15 lines
358 B
PHP
--TEST--
|
|
Bug #72162 (use-after-free - error_reporting)
|
|
--FILE--
|
|
<?php
|
|
error_reporting(E_ALL);
|
|
$var11 = new StdClass();
|
|
$var16 = error_reporting($var11);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): error_reporting(Object(stdClass))
|
|
#1 {main}
|
|
thrown in %s on line %d
|