php-src/Zend/tests/global_to_string_exception.phpt
Nikita Popov a2e3ca1f5b Don't free FETCH_W operand if GLOBAL_LOCK
The error path performed the free unconditionally, while we should
not do it for GLOBAL_LOCK.

Fixes oss-fuzz .
2021-10-12 12:44:35 +02:00

15 lines
227 B
PHP

--TEST--
To string conversion failure in global
--FILE--
<?php
try {
global ${new stdClass};
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Object of class stdClass could not be converted to string