File tree 2 files changed +7
-1
lines changed 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ class ByRef {
23
23
}
24
24
}
25
25
public function __construct () {
26
+ $ this ->undef = 'dynamic ' ;
26
27
$ this ->dynamic = 'dynamic ' ;
28
+ unset($ this ->undef );
27
29
}
28
30
}
29
31
Original file line number Diff line number Diff line change @@ -169,8 +169,12 @@ static void zho_dynamic_it_fetch_current(zend_object_iterator *iter)
169
169
HashPosition pos = zend_hash_iterator_pos (hooked_iter -> dynamic_prop_it , properties );
170
170
171
171
Bucket * bucket = properties -> arData + pos ;
172
+
173
+ if (UNEXPECTED (Z_TYPE (bucket -> val ) == IS_UNDEF )) {
174
+ return ;
175
+ }
176
+
172
177
if (hooked_iter -> by_ref && Z_TYPE (bucket -> val ) != IS_REFERENCE ) {
173
- ZEND_ASSERT (Z_TYPE (bucket -> val ) != IS_UNDEF );
174
178
ZVAL_MAKE_REF (& bucket -> val );
175
179
}
176
180
ZVAL_COPY (& hooked_iter -> current_data , & bucket -> val );
You can’t perform that action at this time.
0 commit comments