File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ class ByRef {
2323 }
2424 }
2525 public function __construct () {
26+ $ this ->undef = 'dynamic ' ;
2627 $ this ->dynamic = 'dynamic ' ;
28+ unset($ this ->undef );
2729 }
2830}
2931
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)
169169 HashPosition pos = zend_hash_iterator_pos (hooked_iter -> dynamic_prop_it , properties );
170170
171171 Bucket * bucket = properties -> arData + pos ;
172+
173+ if (UNEXPECTED (Z_TYPE (bucket -> val ) == IS_UNDEF )) {
174+ return ;
175+ }
176+
172177 if (hooked_iter -> by_ref && Z_TYPE (bucket -> val ) != IS_REFERENCE ) {
173- ZEND_ASSERT (Z_TYPE (bucket -> val ) != IS_UNDEF );
174178 ZVAL_MAKE_REF (& bucket -> val );
175179 }
176180 ZVAL_COPY (& hooked_iter -> current_data , & bucket -> val );
You can’t perform that action at this time.
0 commit comments