mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
[ticket/15342] Fix check_disk_space
PHPBB3-15342
This commit is contained in:
parent
7d7217c381
commit
78c8674643
1 changed files with 12 additions and 19 deletions
|
@ -335,12 +335,10 @@ class upload
|
||||||
* @return bool True if disk space is available or not limited, false if not
|
* @return bool True if disk space is available or not limited, false if not
|
||||||
*/
|
*/
|
||||||
protected function check_disk_space()
|
protected function check_disk_space()
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
$free_space = $this->storage->free_space();
|
$free_space = $this->storage->free_space();
|
||||||
|
|
||||||
if ($free_space <= $this->file->get('filesize'))
|
if ($free_space !== false && $free_space <= $this->file->get('filesize'))
|
||||||
{
|
{
|
||||||
if ($this->auth->acl_get('a_'))
|
if ($this->auth->acl_get('a_'))
|
||||||
{
|
{
|
||||||
|
@ -354,11 +352,6 @@ class upload
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (\phpbb\storage\exception\exception $e)
|
|
||||||
{
|
|
||||||
// Nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue