From f33c93eaa0917ee1f1842b34747f27ded59136c7 Mon Sep 17 00:00:00 2001 From: Yuri Tkachenko Date: Tue, 15 Feb 2022 11:26:10 +0300 Subject: [PATCH] In case of null return $name back --- src/Formatter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Formatter.php b/src/Formatter.php index d7af129..2c7d6b0 100644 --- a/src/Formatter.php +++ b/src/Formatter.php @@ -168,7 +168,9 @@ public static function excludePostNominals($values) */ public static function nameCase($name = '', array $options = []): string { - if ($name == '') return $name; + if ($name == '' || $name == NULL) { + return $name; + } self::setOptions($options);