update application/common.php.

refactor: 优化逻辑短路,例如空字符串,做了 2 次逻辑判断

Signed-off-by: shali <15549351+goodbugood@user.noreply.gitee.com>
pull/488/head
shali 2025-03-19 01:07:04 +00:00 committed by Gitee
parent 9bdf43e808
commit d1c63395e2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ if (!function_exists('__')) {
*/
function __($name, $vars = [], $lang = '')
{
if (is_numeric($name) || !$name) {
if (!$name || is_numeric($name)) {
return $name;
}
if (!is_array($vars)) {