File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ PHP NEWS
20
20
21
21
- Standard:
22
22
. Fixed bug #65489 (glob() basedir check is inconsistent). (Jakub Zelenka)
23
+ . Fixed GH-9244 (Segfault with array_multisort + array_shift). (cmb)
23
24
24
25
04 Aug 2022, PHP 8.2.0beta2
25
26
Original file line number Diff line number Diff line change @@ -5791,6 +5791,8 @@ PHP_FUNCTION(array_multisort)
5791
5791
}
5792
5792
if (repack ) {
5793
5793
zend_hash_to_packed (hash );
5794
+ } else {
5795
+ zend_hash_rehash (hash );
5794
5796
}
5795
5797
}
5796
5798
}
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug GH-9244 (Segfault with array_multisort + array_shift)
3
+ --FILE--
4
+ <?php
5
+ $ items = ['foo ' => 1 , 'bar ' => 2 ];
6
+ $ order = [4 , 3 ];
7
+ array_multisort ($ order , $ items );
8
+ var_dump (array_shift ($ items ));
9
+ ?>
10
+ --EXPECT--
11
+ int(2)
You can’t perform that action at this time.
0 commit comments