Skip to content

Commit

Permalink
Update Inflector::ordinalize() (#3759)
Browse files Browse the repository at this point in the history
put the init() call before the $ordinals test
  • Loading branch information
jeffwjensen authored Oct 24, 2023
1 parent c66da5b commit f0f2989
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/src/Grav/Common/Inflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ public static function classify($table_name)
*/
public static function ordinalize($number)
{
static::init();

if (!is_array(static::$ordinals)) {
return (string)$number;
}

static::init();

if (in_array($number % 100, range(11, 13), true)) {
return $number . static::$ordinals['default'];
}
Expand Down

0 comments on commit f0f2989

Please sign in to comment.