aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/helper/database.php
diff options
context:
space:
mode:
authorRubén Calvo <rubencm@gmail.com>2018-02-17 18:50:04 +0100
committerRubén Calvo <rubencm@gmail.com>2018-02-17 18:50:04 +0100
commitc160882cdbf892e2d19d2990502f0e918dda75e4 (patch)
tree61806af7e1173f91c95f0fae3ca68a02030a4caf /phpBB/phpbb/install/helper/database.php
parent7dca3f4d6c22db2682220309a21362d943e4265e (diff)
downloadforums-c160882cdbf892e2d19d2990502f0e918dda75e4.tar
forums-c160882cdbf892e2d19d2990502f0e918dda75e4.tar.gz
forums-c160882cdbf892e2d19d2990502f0e918dda75e4.tar.bz2
forums-c160882cdbf892e2d19d2990502f0e918dda75e4.tar.xz
forums-c160882cdbf892e2d19d2990502f0e918dda75e4.zip
[ticket/15563] Check if database file is writable only if exists
PHPBB3-15563
Diffstat (limited to 'phpBB/phpbb/install/helper/database.php')
-rw-r--r--phpBB/phpbb/install/helper/database.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/install/helper/database.php b/phpBB/phpbb/install/helper/database.php
index ad0f3dd3cd..21af652f9d 100644
--- a/phpBB/phpbb/install/helper/database.php
+++ b/phpBB/phpbb/install/helper/database.php
@@ -338,7 +338,7 @@ class database
// Check if SQLite database is writable
if ($dbms_info['SCHEMA'] === 'sqlite'
- && (!$this->filesystem->is_writable($dbhost) || !$this->filesystem->is_writable(pathinfo($dbhost, PATHINFO_DIRNAME))))
+ && (($this->filesystem->exists($dbhost) && !$this->filesystem->is_writable($dbhost)) || !$this->filesystem->is_writable(pathinfo($dbhost, PATHINFO_DIRNAME))))
{
$errors[] = array(
'title' =>'INST_ERR_DB_NO_WRITABLE',