diff --git a/src/Rendering/Number.php b/src/Rendering/Number.php index 6f9a0c8..dd41504 100644 --- a/src/Rendering/Number.php +++ b/src/Rendering/Number.php @@ -151,6 +151,9 @@ public function render($data, $citationNumber = null): string */ public static function ordinal($num): string { + if (!is_numeric($num)) { + return $num; + } if ((int) ($num / 10) % 10 == 1) { $ordinalSuffix = CiteProc::getContext()->getLocale()->filter('terms', 'ordinal')->single; } elseif ($num % 10 == 1) {