Added a quick type test for #1764

This commit is contained in:
Andy Miller
2017-12-05 11:04:59 -07:00
parent 80999121a9
commit 30439b864d

View File

@@ -1263,7 +1263,13 @@ class Pages
$list = preg_replace_callback('~([0-9]+)\.~', function($number) {
return sprintf('%032d.', $number[0]);
}, $list);
$sort_flags = Collator::SORT_STRING;
$list_vals = array_values($list);
if (is_numeric(array_shift($list_vals))) {
$sort_flags = Collator::SORT_REGULAR;
} else {
$sort_flags = Collator::SORT_STRING;
}
}
$col->asort($list, $sort_flags);