1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-25 19:11:47 +02:00

Merge pull request #6082 from 3D-I/ticket/16641

[ticket/16641] Fix config.php validation in ACP - PHP 8
This commit is contained in:
Marc Alexander
2021-01-01 16:55:52 +01:00
2 changed files with 10 additions and 12 deletions

View File

@@ -679,17 +679,18 @@ class acp_main
}
}
if (!defined('PHPBB_DISABLE_CONFIG_CHECK') && file_exists($phpbb_root_path . 'config.' . $phpEx) && $phpbb_filesystem->is_writable($phpbb_root_path . 'config.' . $phpEx))
if (!defined('PHPBB_DISABLE_CONFIG_CHECK'))
{
// World-Writable? (000x)
$template->assign_var('S_WRITABLE_CONFIG', (bool) (@fileperms($phpbb_root_path . 'config.' . $phpEx) & 0x0002));
}
$this->php_ini = $phpbb_container->get('php_ini');
$func_overload = $this->php_ini->getNumeric('mbstring.func_overload');
$encoding_translation = $this->php_ini->getString('mbstring.encoding_translation');
$http_input = $this->php_ini->getString('mbstring.http_input');
$http_output = $this->php_ini->getString('mbstring.http_output');
$this->php_ini = $phpbb_container->get('php_ini');
$func_overload = $this->php_ini->getNumeric('mbstring.func_overload');
$encoding_translation = $this->php_ini->getString('mbstring.encoding_translation');
$http_input = $this->php_ini->getString('mbstring.http_input');
$http_output = $this->php_ini->getString('mbstring.http_output');
if (extension_loaded('mbstring'))
{
$template->assign_vars(array(

View File

@@ -613,13 +613,10 @@ class filesystem implements filesystem_interface
}
else
{
$handle = @fopen($file, 'c');
$handle = new \SplFileInfo($file);
if (is_resource($handle))
{
fclose($handle);
return true;
}
// Returns TRUE if writable, FALSE otherwise
return $handle->isWritable();
}
}
else