Skip to content

Commit

Permalink
added sort comment about php 8 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Fellan-91 committed May 15, 2024
1 parent 2e075a5 commit 47bc13c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/class-get-portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,11 @@ private static function get_rand_seed_session() {

/**
* Sort associative array by custom field.
* In some cases,
* The function may sort elements with the same values ​​differently in php 7 and php 8.
* This is due to the following change in how the usort function works.
* If two members compare as equal, they retain their original order.
* Prior to PHP 8.0.0, their relative order in the sorted array was undefined.
*
* @param array $array - Sortable array.
* @param string $field - Array field by which sorting will take place.
Expand Down

0 comments on commit 47bc13c

Please sign in to comment.