From: Max Semenik Date: Sat, 13 Mar 2010 16:47:32 +0000 (+0000) Subject: MTT r63686: Handle realpath errors in SQLite installer X-Git-Tag: 1.31.0-rc.0~37465 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=776879966aa6beac34b91663eecee4fb649e0b2a;p=lhc%2Fweb%2Fwiklou.git MTT r63686: Handle realpath errors in SQLite installer --- diff --git a/config/Installer.php b/config/Installer.php index a54fc97445..c4e2a4c164 100644 --- a/config/Installer.php +++ b/config/Installer.php @@ -1776,7 +1776,11 @@ function writeLocalSettings( $conf ) { $convert = ($conf->ImageMagick ? $conf->ImageMagick : "/usr/bin/convert" ); $rights = ($conf->RightsUrl) ? "" : "# "; $hashedUploads = $conf->safeMode ? '' : '# '; - $sqliteDataDir = escapePhpString( realpath($conf->SQLiteDataDir) ); + $dir = realpath( $conf->SQLiteDataDir ); + if ( !$dir ) { + $dir = $conf->SQLiteDataDir; // dumb realpath sometimes fails + } + $sqliteDataDir = escapePhpString( $dir ); if ( $conf->ShellLocale ) { $locale = '';