File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ PHP NEWS
12
12
. Fixed bug #76174 (openssl extension fails to build with LibreSSL 2.7).
13
13
(Jakub Zelenka)
14
14
15
+ - SPL:
16
+ . Fixed bug #76367 (NoRewindIterator segfault 11). (Laruence)
17
+
15
18
- Standard:
16
19
. Fixed bug #76335 ("link(): Bad file descriptor" with non-ASCII path).
17
20
(Anatol)
Original file line number Diff line number Diff line change @@ -1039,7 +1039,7 @@ static zval *spl_array_it_get_current_data(zend_object_iterator *iter) /* {{{ */
1039
1039
return zend_user_it_get_current_data (iter );
1040
1040
} else {
1041
1041
zval * data = zend_hash_get_current_data_ex (aht , spl_array_get_pos_ptr (aht , object ));
1042
- if (Z_TYPE_P (data ) == IS_INDIRECT ) {
1042
+ if (data && Z_TYPE_P (data ) == IS_INDIRECT ) {
1043
1043
data = Z_INDIRECT_P (data );
1044
1044
}
1045
1045
return data ;
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #76367 (NoRewindIterator segfault 11)
3
+ --FILE--
4
+ <?php
5
+ $ arr = [1 ,3 ,55 ,66 ,43 ,6 ];
6
+
7
+ $ iter = new NoRewindIterator (new ArrayIterator ($ arr ));
8
+
9
+ while ($ iter ->valid ()) {
10
+ $ iter ->next ();
11
+ }
12
+
13
+ var_dump ($ iter ->current ());
14
+ ?>
15
+ --EXPECT--
16
+ NULL
You can’t perform that action at this time.
0 commit comments