]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/installer.php
Merge branch '1.0.x' of git://gitorious.org/statusnet/mainline
[quix0rs-gnu-social.git] / lib / installer.php
index 1cad2fd20ab1cd6add85acd9d39724b755bcecfb..ff2bed1403adad3508dfe0847afe5b4e7aa8f923 100644 (file)
@@ -82,13 +82,16 @@ abstract class Installer
     {
         $pass = true;
 
-        if (file_exists(INSTALLDIR.'/config.php')) {
-            $this->warning('Config file "config.php" already exists.');
-            $pass = false;
+        $config = INSTALLDIR.'/config.php';
+        if (file_exists($config)) {
+            if (!is_writable($config) || filesize($config) > 0) {
+                $this->warning('Config file "config.php" already exists.');
+                $pass = false;
+            }
         }
 
         if (version_compare(PHP_VERSION, '5.2.3', '<')) {
-            $errors[] = 'Require PHP version 5.2.3 or greater.';
+            $this->warning('Require PHP version 5.2.3 or greater.');
             $pass = false;
         }
 
@@ -444,7 +447,7 @@ abstract class Installer
             case 'mysqli':
                 $res = $conn->query($stmt);
                 if ($res === false) {
-                    $error = $conn->error();
+                    $error = $conn->error;
                 }
                 break;
             case 'pgsql':