summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-06-29 19:55:07 +0200
committerNikita Popov <nikita.ppv@gmail.com>2017-07-04 21:11:22 +0200
commit8126599670f5365b7c5d1035ab0e23bb56c554d4 (patch)
tree66c7c0b846dfcf85d176929cbd62db74721d46c7 /Zend/zend_execute_API.c
parent1be05630873afd716376dd92bd70e48ee75e37b0 (diff)
downloadphp-git-8126599670f5365b7c5d1035ab0e23bb56c554d4.tar.gz
Drop dead abstract method check from zend_call_function()
zend_is_callable() is responsible for doing these kinds of checks already. Aldro drop a piece of obsolete commented out code.
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 390a745c2d..2564ee993d 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -742,28 +742,18 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
call = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_FUNCTION | ZEND_CALL_DYNAMIC,
func, fci->param_count, fci_cache->called_scope, fci->object);
- if (func->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {
- if (func->common.fn_flags & ZEND_ACC_ABSTRACT) {
- zend_throw_error(NULL, "Cannot call abstract method %s::%s()", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name));
+ if (UNEXPECTED(func->common.fn_flags & ZEND_ACC_DEPRECATED)) {
+ zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
+ func->common.scope ? ZSTR_VAL(func->common.scope->name) : "",
+ func->common.scope ? "::" : "",
+ ZSTR_VAL(func->common.function_name));
+ if (UNEXPECTED(EG(exception))) {
zend_vm_stack_free_call_frame(call);
if (EG(current_execute_data) == &dummy_execute_data) {
EG(current_execute_data) = dummy_execute_data.prev_execute_data;
}
return FAILURE;
}
- if (func->common.fn_flags & ZEND_ACC_DEPRECATED) {
- zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
- func->common.scope ? ZSTR_VAL(func->common.scope->name) : "",
- func->common.scope ? "::" : "",
- ZSTR_VAL(func->common.function_name));
- if (UNEXPECTED(EG(exception))) {
- zend_vm_stack_free_call_frame(call);
- if (EG(current_execute_data) == &dummy_execute_data) {
- EG(current_execute_data) = dummy_execute_data.prev_execute_data;
- }
- return FAILURE;
- }
- }
}
for (i=0; i<fci->param_count; i++) {
@@ -844,12 +834,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
EG(current_execute_data) = call->prev_execute_data;
zend_vm_stack_free_args(call);
- /* We shouldn't fix bad extensions here,
- because it can break proper ones (Bug #34045)
- if (!EX(function_state).function->common.return_reference)
- {
- INIT_PZVAL(f->retval);
- }*/
if (EG(exception)) {
zval_ptr_dtor(fci->retval);
ZVAL_UNDEF(fci->retval);