Parcourir la source

Update:Fixed hosts error

Jinhui Zhu il y a 5 ans
Parent
commit
ee777c7daf
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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(