diff options
author | Ondřej Surý <ondrej@sury.org> | 2010-01-07 13:31:53 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2010-01-07 13:31:53 +0100 |
commit | 0fab6db7cac8d2be99579dd049f812a8ff98e74f (patch) | |
tree | 91f01b0d06916c78262404096bfd466b8e95e5b5 /Zend/zend.c | |
parent | d3a8757891280dc6650ca7eead67830c794b0e7b (diff) | |
download | php-0fab6db7cac8d2be99579dd049f812a8ff98e74f.tar.gz |
Imported Upstream version 5.3.1upstream/5.3.1
Diffstat (limited to 'Zend/zend.c')
-rw-r--r-- | Zend/zend.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index a5f5a58b8..df9a86cbd 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.308.2.12.2.35.2.33 2009/06/16 16:10:15 rasmus Exp $ */ +/* $Id: zend.c 290026 2009-10-28 11:08:33Z pajoye $ */ #include "zend.h" #include "zend_extensions.h" @@ -1067,9 +1067,15 @@ 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; |