dever il y a 4 ans
Parent
commit
f3c6990e08
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  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;
     }