mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Solve this with the same pattern as ZEND_AST_GREATER[_EQUAL]. Fixes OSS-Fuzz #434346548 Closes GH-19291
23 lines
368 B
PHP
23 lines
368 B
PHP
--TEST--
|
|
OSS-Fuzz #434346548: Failed assertion with throwing __toString in binary const expr
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
function __toString() {}
|
|
}
|
|
|
|
function test($y = new Foo() < "") {
|
|
var_dump();
|
|
}
|
|
|
|
try {
|
|
test();
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Foo::__toString(): Return value must be of type string, none returned
|