summaryrefslogtreecommitdiff
path: root/ext/spl/spl_fixedarray.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/spl_fixedarray.c')
-rw-r--r--ext/spl/spl_fixedarray.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 3abd143636..392175f781 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -507,15 +507,14 @@ static int spl_fixedarray_object_has_dimension(zval *object, zval *offset, int c
if (intern->fptr_offset_has) {
zval rv;
+ zend_bool result;
+
SEPARATE_ARG_IF_REF(offset);
zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_has, "offsetExists", &rv, offset);
zval_ptr_dtor(offset);
- if (!Z_ISUNDEF(rv)) {
- zend_bool result = zend_is_true(&rv);
- zval_ptr_dtor(&rv);
- return result;
- }
- return 0;
+ result = zend_is_true(&rv);
+ zval_ptr_dtor(&rv);
+ return result;
}
return spl_fixedarray_object_has_dimension_helper(intern, offset, check_empty);