mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-29 21:10:31 +02:00
Merge pull request #6835 from rxu/ticket/17529
[ticket/17529] Fix installer config.php availability checks
This commit is contained in:
@@ -145,7 +145,12 @@ 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))
|
||||||
{
|
{
|
||||||
$fp = @fopen($path, 'w');
|
if (!is_resource($fp = @fopen($path, 'w')))
|
||||||
|
{
|
||||||
|
$exists = $writable = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -155,21 +160,14 @@ class check_filesystem extends \phpbb\install\task_base
|
|||||||
$exists = true;
|
$exists = true;
|
||||||
}
|
}
|
||||||
catch (\phpbb\filesystem\exception\filesystem_exception $e)
|
catch (\phpbb\filesystem\exception\filesystem_exception $e)
|
||||||
{
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists($path))
|
|
||||||
{
|
|
||||||
if (!$this->filesystem->is_writable($path))
|
|
||||||
{
|
{
|
||||||
$writable = false;
|
$writable = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
else if (!$this->filesystem->is_writable($path))
|
||||||
{
|
{
|
||||||
$exists = $writable = false;
|
$writable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->set_test_passed(($exists && $writable) || $failable);
|
$this->set_test_passed(($exists && $writable) || $failable);
|
||||||
|
Reference in New Issue
Block a user