mirror of
https://github.com/getgrav/grav.git
synced 2025-10-26 00:46:07 +02:00
Update Inflector::ordinalize() (#3759)
put the init() call before the $ordinals test
This commit is contained in:
@@ -310,12 +310,12 @@ class Inflector
|
||||
*/
|
||||
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'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user