From: Brion Vibber Date: Thu, 3 Jun 2010 17:13:28 +0000 (-0700) Subject: Installer tweak to aid with IIS setup: if config.php exists, but is both empty and... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9bb48c36eab5e6856b7768c273d382a825f22ff0;p=quix0rs-gnu-social.git Installer tweak to aid with IIS setup: if config.php exists, but is both empty and writable, let the installer proceed and overwrite it. --- diff --git a/lib/installer.php b/lib/installer.php index 58ffbfef7e..7936d5d5d1 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -81,9 +81,12 @@ 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', '<')) {