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:
+2
-7
@@ -1181,13 +1181,8 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
|
||||
if (!EG(active_symbol_table)) {
|
||||
ZVAL_NULL(¶ms[4]);
|
||||
} else {
|
||||
//???
|
||||
#if 1
|
||||
ZVAL_NULL(¶ms[4]);
|
||||
#else
|
||||
ZVAL_ARR(¶ms[4], EG(active_symbol_table));
|
||||
zval_copy_ctor(¶ms[4]);
|
||||
#endif
|
||||
array_init_size(¶ms[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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user