mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Type casting can be used.
This commit is contained in:
parent
dcb828d983
commit
1f44ed29aa
2 changed files with 4 additions and 4 deletions
|
@ -121,8 +121,8 @@ function sort_multi_array($sort_array, $key, $sort_order, $pre_string_sort = 0)
|
|||
// do checks based on key
|
||||
$switch = false;
|
||||
if (!$string_sort) {
|
||||
if (($sort_order == 'DESC' && intval(@$sort_array[$j][$key]) < intval(@$sort_array[$j + 1][$key])) ||
|
||||
($sort_order == 'ASC' && intval(@$sort_array[$j][$key]) > intval(@$sort_array[$j + 1][$key]))) {
|
||||
if (($sort_order == 'DESC' && (int)(@$sort_array[$j][$key]) < (int)(@$sort_array[$j + 1][$key])) ||
|
||||
($sort_order == 'ASC' && (int)(@$sort_array[$j][$key]) > (int)(@$sort_array[$j + 1][$key]))) {
|
||||
$switch = true;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue