php-src/Zend/tests/exception_009.phpt
Christoph M. Becker 727b422ad9 Fix #72948: Uncatchable "Catchable" fatal error for class to string conversions
E_RECOVERABLE errors are reported as "Catchable fatal error". This is
misleading, because they actually can't be caught via try-catch statements.
Therefore we change the wording to "Recoverable fatal error" as suggested by
Nikita.
2016-09-03 13:05:37 +02:00

29 lines
559 B
PHP

--TEST--
Testing exception properties
--FILE--
<?php
class my_file
{
public function __toString()
{
return "somebuildfilename" ;
}
}
class my_exception extends exception
{
public function __construct()
{
$this->message = new stdclass ;
$this->file = new my_file ;
$this->line = "12" ;
}
}
throw new my_exception;
?>
--EXPECT--
Recoverable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0