mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00: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:
commit
dba60740f6
2 changed files with 10 additions and 12 deletions
|
@ -679,7 +679,7 @@ 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));
|
||||
|
@ -690,6 +690,7 @@ class acp_main
|
|||
$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(
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue