mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
21148679d1
Previously if the "non well formed" notice was converted into an exception we'd still end up executing the function. Also drop the now unnecessary EG(exception) checks in the engine. Additionally remote a bogus exception in zend_is_callable: It should only be writing to error, but not directly throwing.
23 lines
460 B
PHP
23 lines
460 B
PHP
--TEST--
|
|
A "non well formed" notice converted to exception should result in a ZPP failure
|
|
--FILE--
|
|
<?php
|
|
|
|
set_error_handler(function($_, $msg) {
|
|
throw new Exception($msg);
|
|
}, E_NOTICE);
|
|
|
|
try {
|
|
wordwrap("foo", "123foo", "");
|
|
} catch (Exception $e) {
|
|
echo $e, "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Exception: A non well formed numeric value encountered in %s:%d
|
|
Stack trace:
|
|
#0 [internal function]: {closure}(%s)
|
|
#1 %s(%d): wordwrap('foo', '123foo', '')
|
|
#2 {main}
|