Compare commits

..

1 commit

Author SHA1 Message Date
Daniel James
247c8bcb1c
Merge bd77b30372 into 4f10e6e212 2025-06-17 14:05:58 -04:00

View file

@ -145,12 +145,7 @@ class check_filesystem extends \phpbb\install\task_base
// Try to create file if it does not exists // Try to create file if it does not exists
if (!file_exists($path)) if (!file_exists($path))
{ {
if (!is_resource($fp = @fopen($path, 'w'))) $fp = @fopen($path, 'w');
{
$exists = $writable = false;
}
else
{
@fclose($fp); @fclose($fp);
try try
{ {
@ -161,14 +156,21 @@ class check_filesystem extends \phpbb\install\task_base
} }
catch (\phpbb\filesystem\exception\filesystem_exception $e) catch (\phpbb\filesystem\exception\filesystem_exception $e)
{ {
$writable = false; // Do nothing
} }
} }
}
else if (!$this->filesystem->is_writable($path)) if (file_exists($path))
{
if (!$this->filesystem->is_writable($path))
{ {
$writable = false; $writable = false;
} }
}
else
{
$exists = $writable = false;
}
$this->set_test_passed(($exists && $writable) || $failable); $this->set_test_passed(($exists && $writable) || $failable);