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
2020
2121- Standard:
2222 . Fixed bug #65489 (glob() basedir check is inconsistent). (Jakub Zelenka)
23+ . Fixed GH-9244 (Segfault with array_multisort + array_shift). (cmb)
2324
242504 Aug 2022, PHP 8.2.0beta2
2526
Original file line number Diff line number Diff line change @@ -5791,6 +5791,8 @@ PHP_FUNCTION(array_multisort)
57915791 }
57925792 if (repack ) {
57935793 zend_hash_to_packed (hash );
5794+ } else {
5795+ zend_hash_rehash (hash );
57945796 }
57955797 }
57965798 }
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