com php-src: Merge branch 'PHP-7.1': Zend/zend_vm_def.h Zend/zend_vm_execute.h

From: Date: Tue, 18 Oct 2016 12:32:12 +0000
Subject: com php-src: Merge branch 'PHP-7.1': Zend/zend_vm_def.h Zend/zend_vm_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95203@lists.php.net to get a copy of this message
Commit: 2b246e2e38e1df9fe4611e3e6ba02a0f78cc700d Author: Bob Weinand <bobwei9@hotmail.com> Tue, 18 Oct 2016 14:32:12 +0200 Parents: 81043bbfea834c8efca87ff0303f5e2cb2c13766 58f3b9c0efd07791e8589493c597730d6c425f6e Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2b246e2e38e1df9fe4611e3e6ba02a0f78cc700d Log: Merge branch 'PHP-7.1' Changed paths: MM Zend/zend_vm_def.h MM Zend/zend_vm_execute.h Diff: diff --cc Zend/zend_vm_def.h index c5dc325,78342a0..f47fd2d --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@@ -3492,8 -3510,22 +3510,19 @@@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CAL func = fcc.function_handler; called_scope = fcc.called_scope; object = fcc.object; + if (error) { + efree(error); + /* This is the only soft error is_callable() can generate */ + zend_error(E_DEPRECATED, + "Non-static method %s::%s() should not be called statically", + ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + FREE_OP2(); + HANDLE_EXCEPTION(); + } + } if (func->common.fn_flags & ZEND_ACC_CLOSURE) { /* Delay closure destruction until its invocation */ - if (OP2_TYPE & (IS_VAR|IS_CV)) { - ZVAL_DEREF(function_name); - } ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT); GC_REFCOUNT((zend_object*)func->common.prototype)++; call_info |= ZEND_CALL_CLOSURE; diff --cc Zend/zend_vm_execute.h index 61e63fa,a8a0466..bdc3731 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@@ -5571,8 -5640,22 +5619,19 @@@ static ZEND_OPCODE_HANDLER_RET ZEND_FAS func = fcc..function_handler; called_scope = fcc.called_scope; object = fcc.object; + if (error) { + efree(error); + /* This is the only soft error is_callable() can generate */ + zend_error(E_DEPRECATED, + "Non-static method %s::%s() should not be called statically", + ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + + HANDLE_EXCEPTION(); + } + } if (func->common.fn_flags & ZEND_ACC_CLOSURE) { /* Delay closure destruction until its invocation */ - if (IS_CONST & (IS_VAR|IS_CV)) { - ZVAL_DEREF(function_name); - } ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT); GC_REFCOUNT((zend_object*)func->common.prototype)++; call_info |= ZEND_CALL_CLOSURE; @@@ -9466,8 -9555,22 +9534,19 @@@ static ZEND_OPCODE_HANDLER_RET ZEND_FAS func = fcc.function_handler; called_scope = fcc.called_scope; object = fcc.object; + if (error) { + efree(error); + /* This is the only soft error is_callable() can generate */ + zend_error(E_DEPRECATED, + "Non-static method %s::%s() should not be called statically", + ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + + HANDLE_EXCEPTION(); + } + } if (func->common.fn_flags & ZEND_ACC_CLOSURE) { /* Delay closure destruction until its invocation */ - if (IS_CV & (IS_VAR|IS_CV)) { - ZVAL_DEREF(function_name); - } ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT); GC_REFCOUNT((zend_object*)func->common.prototype)++; call_info |= ZEND_CALL_CLOSURE; @@@ -11425,8 -11534,22 +11513,19 @@@ static ZEND_OPCODE_HANDLER_RET ZEND_FAS func = fcc.function_handler; called_scope = fcc.called_scope; object = fcc.object; + if (error) { + efree(error); + /* This is the only soft error is_callable() can generate */ + zend_error(E_DEPRECATED, + "Non-static method %s::%s() should not be called statically", + ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + zval_ptr_dtor_nogc(free_op2); + HANDLE_EXCEPTION(); + } + } if (func->common.fn_flags & ZEND_ACC_CLOSURE) { /* Delay closure destruction until its invocation */ - if ((IS_TMP_VAR|IS_VAR) & (IS_VAR|IS_CV)) { - ZVAL_DEREF(function_name); - } ZEND_ASSERT(GC_TYPE((zend_object*)func->common.prototype) == IS_OBJECT); GC_REFCOUNT((zend_object*)func->common.prototype)++; call_info |= ZEND_CALL_CLOSURE;

« previous php.cvs (#95203) next »