$filename = $path_to_root . "/config_db.php";
// Check if the file exists and is writable first.
- if (!file_exists($filename) || (is_writable($path_to_root) && is_writable($filename)))
+ if ((!file_exists($filename) && is_writable($path_to_root)) || is_writable($filename))
{
if (!$zp = fopen($filename, 'w'))
{