diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 0b47e70d..5a82bb09 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -1536,9 +1536,9 @@ class Auth extends BaseController $queryBuilder = $queryBuilder->where('phone_brand', ''); } } - $appInfo = $queryBuilder->order('version', 'desc')->fetchSql(false)->find(); + $appInfo = ($queryBuilder->order('version', 'desc')->fetchSql(false)->find()) ?? (object)[]; if (empty($appInfo)) { - $appInfo = (Db::name('AppUpdate')->where('type', $type)->where('version', '>', $version)->find()) ?? (object)[]; + $appInfo = (Db::name('AppUpdate')->where('type', $type)->where('version', '>', $version)->find()) ?? (object)[]; } }