mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
[ticket/16416] Fix non-numeric value encountered - ACP attachments settings
PHPBB3-16416
This commit is contained in:
parent
3539f9372d
commit
b9123cad7c
1 changed files with 9 additions and 1 deletions
|
@ -225,7 +225,15 @@ class acp_attachments
|
|||
if (in_array($config_name, array('attachment_quota', 'max_filesize', 'max_filesize_pm')))
|
||||
{
|
||||
$size_var = $request->variable($config_name, '');
|
||||
$this->new_config[$config_name] = $config_value = ($size_var == 'kb') ? round($config_value * 1024) : (($size_var == 'mb') ? round($config_value * 1048576) : $config_value);
|
||||
|
||||
if (!empty($config_value))
|
||||
{
|
||||
$this->new_config[$config_name] = $config_value = ($size_var == 'kb') ? round($config_value * 1024) : (($size_var == 'mb') ? round($config_value * 1048576) : $config_value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$config_value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
|
|
Loading…
Add table
Reference in a new issue