summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.c
diff options
context:
space:
mode:
authorAaron Piotrowski <aaron@trowski.com>2016-06-05 02:01:01 -0500
committerAaron Piotrowski <aaron@trowski.com>2016-06-05 02:01:01 -0500
commitcf0290c27380e17d2407828c974882d39ed976f4 (patch)
treeb1f55486e4ff5438e9b095395357a80e2a4e6da1 /Zend/zend_inheritance.c
parentc2266c382acf8a16c18bd7df013fe40348cd478d (diff)
downloadphp-git-cf0290c27380e17d2407828c974882d39ed976f4.tar.gz
Fix abort too early
Diffstat (limited to 'Zend/zend_inheritance.c')
-rw-r--r--Zend/zend_inheritance.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index dd1442e828..1785f45372 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -178,6 +178,8 @@ static zend_bool zend_iterable_type_check(zend_arg_info *arg_info) /* {{{ */
if (ce && instanceof_function(ce, zend_ce_traversable)) {
return 1;
}
+
+ return 0;
}
if (arg_info->type_hint == IS_ITERABLE || arg_info->type_hint == IS_ARRAY) {
@@ -336,11 +338,11 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
proto_arg_info = &proto->common.arg_info[proto->common.num_args];
}
- if (fe_arg_info->type_hint == IS_ITERABLE && zend_iterable_type_check(proto_arg_info)) {
- continue;
- }
-
- if (!zend_do_perform_type_hint_check(fe, fe_arg_info, proto, proto_arg_info)) {
+ if (fe_arg_info->type_hint == IS_ITERABLE) {
+ if (!zend_iterable_type_check(proto_arg_info)) {
+ return 0;
+ }
+ } else if (!zend_do_perform_type_hint_check(fe, fe_arg_info, proto, proto_arg_info)) {
return 0;
}
@@ -364,11 +366,11 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
return 0;
}
- if (proto->common.arg_info[-1].type_hint == IS_ITERABLE && zend_iterable_type_check(fe->common.arg_info - 1)) {
- return 1;
- }
-
- if (!zend_do_perform_type_hint_check(fe, fe->common.arg_info - 1, proto, proto->common.arg_info - 1)) {
+ if (proto->common.arg_info[-1].type_hint == IS_ITERABLE) {
+ if (!zend_iterable_type_check(fe->common.arg_info - 1)) {
+ return 0;
+ }
+ } else if (!zend_do_perform_type_hint_check(fe, fe->common.arg_info - 1, proto, proto->common.arg_info - 1)) {
return 0;
}