Skip to content

Commit a653329

Browse files
authored
Merge pull request #9 from dimadimx/feature/add_detecting_string_in_auto_mode
fix string case-sensitive in auto mode
2 parents 11c2ec0 + 556a8ff commit a653329

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Skeleton/Pager/Util.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ public static function object_sort($objects, $property, $direction = 'asc', $typ
4545
}
4646
}
4747

48-
if (is_numeric($property1) AND is_numeric($property2) AND $type == 'auto') {
48+
if (is_numeric($property1) && is_numeric($property2) && $type == 'auto') {
4949
$type = 'int';
50+
} elseif (is_string($property1) && is_string($property2) && $type == 'auto') {
51+
$type = 'string';
5052
}
5153

5254
if ($type == 'string') {

0 commit comments

Comments
 (0)