소스 검색

fix bug when no admin be user exists

Olivier Massot 4 년 전
부모
커밋
b37a53da7b
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      ot_admin/Classes/Controller/SiteController.php

+ 5 - 3
ot_admin/Classes/Controller/SiteController.php

@@ -2341,10 +2341,12 @@ class SiteController extends ActionController
                 ->execute()
                 ->fetch();
 
-            if ((string)$rootUid != (string)$row['db_mountpoints']) {
-                throw new \RuntimeException("The be_user named '" . $expectedUsername . "' has unexpected mounted website(s)");
+            if ($row['uid']) {
+                if ((string)$rootUid != (string)$row['db_mountpoints']) {
+                    throw new \RuntimeException("The be_user named '" . $expectedUsername . "' has unexpected mounted website(s)");
+                }
+                $adminUid = $row['uid'];
             }
-            $adminUid = $row['uid'];
         }
 
         if ($adminUid == null) {