mirror of https://gitee.com/karson/fastadmin.git
update application/common.php.
refactor: 优化逻辑短路,例如空字符串,做了 2 次逻辑判断 Signed-off-by: shali <15549351+goodbugood@user.noreply.gitee.com>pull/488/head
parent
9bdf43e808
commit
d1c63395e2
|
|
@ -16,7 +16,7 @@ if (!function_exists('__')) {
|
||||||
*/
|
*/
|
||||||
function __($name, $vars = [], $lang = '')
|
function __($name, $vars = [], $lang = '')
|
||||||
{
|
{
|
||||||
if (is_numeric($name) || !$name) {
|
if (!$name || is_numeric($name)) {
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
if (!is_array($vars)) {
|
if (!is_array($vars)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue