mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Avoid magic method hash lookups
This commit is contained in:
parent
43aca3118a
commit
091d77f28a
4 changed files with 5 additions and 5 deletions
|
@ -984,7 +984,7 @@ ZEND_API ZEND_COLD void zend_exception_error(zend_object *ex, int severity) /* {
|
|||
zend_string *str, *file = NULL;
|
||||
zend_long line = 0;
|
||||
|
||||
zend_call_method_with_0_params(&exception, ce_exception, NULL, "__tostring", &tmp);
|
||||
zend_call_method_with_0_params(&exception, ce_exception, &ex->ce->__tostring, "__tostring", &tmp);
|
||||
if (!EG(exception)) {
|
||||
if (Z_TYPE(tmp) != IS_STRING) {
|
||||
zend_error(E_WARNING, "%s::__toString() must return a string", ZSTR_VAL(ce_exception->name));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue