summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2019-02-21 23:54:26 +0100
committerJoe Watkins <krakjoe@php.net>2019-02-21 23:54:26 +0100
commit4d3415636d4e68144c08ce77f0430c4702782c55 (patch)
treee8afce3c414bf657c6bd5caa5c79b02d0d62bb5c /Zend/zend_compile.c
parent0bbbd0f9e7449a2f204f959d06e5266175a86be9 (diff)
downloadphp-git-4d3415636d4e68144c08ce77f0430c4702782c55.tar.gz
While the compiler does not have the FBC set for zend_get_call_op, optimizer does, and so incorrectly results in ignoring these flags.
If someone has a better patch, please merge it ASAP, this appears to be correct as I and Nikita originally thought. Revert "Revert "zend_get_call_op ignoring compiler flags zend_get_call_op will ignore ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USER_FUNCTIONS, breaking the intention of these flags"" This reverts commit 0bbbd0f9e7449a2f204f959d06e5266175a86be9.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 1f6449fa94..eee2347f49 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3044,7 +3044,7 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc) /* {{{ */
{
if (fbc) {
- if (fbc->type == ZEND_INTERNAL_FUNCTION) {
+ if (fbc->type == ZEND_INTERNAL_FUNCTION && !(CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)) {
if (init_op->opcode == ZEND_INIT_FCALL && !zend_execute_internal) {
if (!(fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED|ZEND_ACC_HAS_TYPE_HINTS|ZEND_ACC_RETURN_REFERENCE))) {
return ZEND_DO_ICALL;
@@ -3052,7 +3052,7 @@ ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc)
return ZEND_DO_FCALL_BY_NAME;
}
}
- } else {
+ } else if (!(CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS)){
if (zend_execute_ex == execute_ex && !(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) {
return ZEND_DO_UCALL;
}