1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/oss_fuzz_434346548.phpt
Ilija Tovilo 80022c035b Fix failed assertion with throwing __toString in binary const expr
Solve this with the same pattern as ZEND_AST_GREATER[_EQUAL].

Fixes OSS-Fuzz #434346548
Closes GH-19291
2025-07-30 13:34:01 +02:00

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