1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00

Passing symbol_table into user error handlers

This commit is contained in:
Dmitry Stogov
2014-03-04 14:17:17 +04:00
parent 7bc5d0b1f4
commit e0f6bae56b
2 changed files with 4 additions and 8 deletions
+2 -7
View File
@@ -1181,13 +1181,8 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
if (!EG(active_symbol_table)) {
ZVAL_NULL(&params[4]);
} else {
//???
#if 1
ZVAL_NULL(&params[4]);
#else
ZVAL_ARR(&params[4], EG(active_symbol_table));
zval_copy_ctor(&params[4]);
#endif
array_init_size(&params[4], zend_hash_num_elements(EG(active_symbol_table)));
zend_hash_copy(Z_ARRVAL(params[4]), EG(active_symbol_table), zval_add_ref);
}
ZVAL_COPY_VALUE(&orig_user_error_handler, &EG(user_error_handler));
+2 -1
View File
@@ -99,6 +99,7 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, dtor_func_t pDestructor,
{
uint i = 3;
ht->flags = 0;
SET_INCONSISTENT(HT_OK);
if (nSize >= 0x80000000) {
@@ -119,7 +120,7 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, dtor_func_t pDestructor,
ht->nNumOfElements = 0;
ht->nNextFreeElement = 0;
ht->nInternalPointer = INVALID_IDX;
ht->flags = HASH_FLAG_APPLY_PROTECTION;
ht->flags |= HASH_FLAG_APPLY_PROTECTION;
if (persistent) {
ht->flags |= HASH_FLAG_PERSISTENT;
}