Skip to content
Snippets Groups Projects

Fix numeric token type names being reset

1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -61,7 +61,9 @@ class Token extends TokenBase implements TokenInterface {
@@ -61,7 +61,9 @@ class Token extends TokenBase implements TokenInterface {
array_multisort($by_name, SORT_ASC, SORT_NATURAL | SORT_FLAG_CASE, $token_info['types']);
array_multisort($by_name, SORT_ASC, SORT_NATURAL | SORT_FLAG_CASE, $token_info['types']);
foreach (array_keys($token_info['tokens']) as $type) {
foreach (array_keys($token_info['tokens']) as $type) {
$by_name = $this->prepareMultisort($token_info['tokens'][$type]);
$by_name = $this->prepareMultisort($token_info['tokens'][$type]);
array_multisort($by_name, SORT_ASC, SORT_NATURAL | SORT_FLAG_CASE, $token_info['tokens'][$type]);
$keys = array_keys($by_name);
 
array_multisort($by_name, SORT_ASC, SORT_NATURAL | SORT_FLAG_CASE, $token_info['tokens'][$type], $keys);
 
$token_info['tokens'][$type] = array_combine($keys, $token_info['tokens'][$type]);
}
}
$this->tokenInfo = $token_info;
$this->tokenInfo = $token_info;
Loading