Skip to content

Commit

Permalink
Merge pull request #9 from dimadimx/feature/add_detecting_string_in_a…
Browse files Browse the repository at this point in the history
…uto_mode

fix string case-sensitive in auto mode
  • Loading branch information
christopheg authored Dec 16, 2024
2 parents 11c2ec0 + 556a8ff commit a653329
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Skeleton/Pager/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ public static function object_sort($objects, $property, $direction = 'asc', $typ
}
}

if (is_numeric($property1) AND is_numeric($property2) AND $type == 'auto') {
if (is_numeric($property1) && is_numeric($property2) && $type == 'auto') {
$type = 'int';
} elseif (is_string($property1) && is_string($property2) && $type == 'auto') {
$type = 'string';
}

if ($type == 'string') {
Expand Down

0 comments on commit a653329

Please sign in to comment.