适配 php8

This commit is contained in:
F4nniu
2023-07-06 17:26:26 +08:00
parent 973285c462
commit 4a004b0b85
2 changed files with 3 additions and 3 deletions

View File

@@ -613,7 +613,7 @@ class Loader
if ($type) {
$name = preg_replace_callback('/_([a-zA-Z])/', function ($match) {
return strtoupper($match[1]);
}, $name);
}, $name ?? '');
return $ucfirst ? ucfirst($name) : lcfirst($name);
}