mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
- Fixed bug #49142 (crash when exception thrown from __tostring())
This commit is contained in:
parent
c5f6749741
commit
e21c46aec2
11
Zend/zend.c
11
Zend/zend.c
@ -1661,9 +1661,14 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
|
||||
if (!EG(active_symbol_table)) {
|
||||
zend_rebuild_symbol_table(TSRMLS_C);
|
||||
}
|
||||
Z_ARRVAL_P(z_context) = EG(active_symbol_table);
|
||||
Z_TYPE_P(z_context) = IS_ARRAY;
|
||||
zval_copy_ctor(z_context);
|
||||
/* during shutdown the symbol table table can be still null */
|
||||
if (!EG(active_symbol_table)) {
|
||||
Z_TYPE_P(z_context) = IS_NULL;
|
||||
} else {
|
||||
Z_ARRVAL_P(z_context) = EG(active_symbol_table);
|
||||
Z_TYPE_P(z_context) = IS_ARRAY;
|
||||
zval_copy_ctor(z_context);
|
||||
}
|
||||
|
||||
params = (zval ***) emalloc(sizeof(zval **)*5);
|
||||
params[0] = &z_error_type;
|
||||
|
Loading…
Reference in New Issue
Block a user