소스 검색

Update:Fixed hosts error

Jinhui Zhu 4 년 전
부모
커밋
ee777c7daf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Application.php

+ 1 - 1
src/Application.php

@@ -445,7 +445,7 @@ class Application
         }
         //如果设置了host的话,看host对应的controller路径
         $hosts = $this->appConfigure('hosts');
-        if (count($hosts) > 0) {
+        if (!empty($hosts) && is_array($hosts) && count($hosts) > 0) {
             foreach ($hosts AS $host) {
                 if ($host['domain'] == $this->request->host) {
                     Register::set(