Skip to content

Commit

Permalink
兼容php8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ken678 authored Aug 1, 2023
1 parent 8619dab commit 85be16d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/think/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public static function parseName($name, $type = 0, $ucfirst = true)
if ($type) {
$name = preg_replace_callback('/_([a-zA-Z])/', function ($match) {
return strtoupper($match[1]);
}, $name);
}, $name ?? '');
return $ucfirst ? ucfirst($name) : lcfirst($name);
}

Expand Down

0 comments on commit 85be16d

Please sign in to comment.