dever преди 4 години
родител
ревизия
f3c6990e08
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      lib/Config.php

+ 5 - 1
lib/Config.php

@@ -12,7 +12,11 @@ class Config
 
     protected function import()
     {
-        $config = include($this->file());
+        $file = $this->file();
+        if (!is_file($file)) {
+            $this->create();
+        }
+        $config = include($file);
         return $config;
     }