mirror of
https://github.com/php/php-src.git
synced 2026-04-23 16:08:35 +02:00
aad39879f2
Access to undefined constants will now always result in an Error exception being thrown. This required quite a few test changes, because there were many buggy tests that unintentionally used bareword fallback in combination with error suppression.
19 lines
378 B
PHP
19 lines
378 B
PHP
--TEST--
|
|
Bug #74673 (Segfault when cast Reflection object to string with undefined constant)
|
|
--FILE--
|
|
<?php
|
|
|
|
class A
|
|
{
|
|
public function method($test = PHP_SELF + 1)
|
|
{
|
|
}
|
|
}
|
|
|
|
$class = new ReflectionClass('A');
|
|
|
|
echo $class;
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Method ReflectionClass::__toString() must not throw an exception, caught Error: Undefined constant 'PHP_SELF' in %s on line %d
|