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;
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;
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;
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;