From c160882cdbf892e2d19d2990502f0e918dda75e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Sat, 17 Feb 2018 18:50:04 +0100 Subject: [ticket/15563] Check if database file is writable only if exists PHPBB3-15563 --- phpBB/phpbb/install/helper/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', -- cgit v1.2.1