Skip to content

Commit 908b662

Browse files
committed
PHP-7 zend_call_function() doesn't support symbol_table substitution
1 parent b6bbe33 commit 908b662

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Zend/zend_execute_API.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,9 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
851851
ZEND_ADD_CALL_FLAG(call, ZEND_CALL_CLOSURE);
852852
}
853853

854+
/* PHP-7 doesn't support symbol_table substitution for functions */
855+
ZEND_ASSERT(fci->symbol_table == NULL);
856+
854857
if (func->type == ZEND_USER_FUNCTION) {
855858
int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0;
856859
EG(scope) = func->common.scope;

sapi/phpdbg/phpdbg_prompt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack) /* {{{ */
121121
ZVAL_STRINGL(&fci.function_name, lc_name, name->len);
122122
fci.size = sizeof(zend_fcall_info);
123123
fci.function_table = &PHPDBG_G(registered);
124-
fci.symbol_table = zend_rebuild_symbol_table();
124+
//???fci.symbol_table = zend_rebuild_symbol_table();
125+
fci.symbol_table = NULL;
125126
fci.object = NULL;
126127
fci.retval = &fretval;
127128
fci.no_separation = 1;

0 commit comments

Comments
 (0)