Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exception handling in array_multisort()
Closes GH-11302
- Loading branch information
Showing
3 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--TEST-- | ||
Exception handling in array_multisort() | ||
--FILE-- | ||
<?php | ||
$array = [1 => new DateTime(), 0 => new DateTime()]; | ||
array_multisort($array, SORT_STRING); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Uncaught Error: Object of class DateTime could not be converted to string in %s:%d | ||
Stack trace: | ||
#0 %s(%d): array_multisort(Array, 2) | ||
#1 {main} | ||
thrown in %s on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters