mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #6141 from 3D-I/ticket/16705
[ticket/16705] Fix check_disk_space function - PHP 8
This commit is contained in:
commit
b978fd9dc6
2 changed files with 4 additions and 1 deletions
|
@ -296,8 +296,10 @@ class upload
|
||||||
*/
|
*/
|
||||||
protected function check_disk_space()
|
protected function check_disk_space()
|
||||||
{
|
{
|
||||||
if ($free_space = @disk_free_space($this->phpbb_root_path . $this->config['upload_path']))
|
if (function_exists('disk_free_space'))
|
||||||
{
|
{
|
||||||
|
$free_space = @disk_free_space($this->phpbb_root_path);
|
||||||
|
|
||||||
if ($free_space <= $this->file->get('filesize'))
|
if ($free_space <= $this->file->get('filesize'))
|
||||||
{
|
{
|
||||||
if ($this->auth->acl_get('a_'))
|
if ($this->auth->acl_get('a_'))
|
||||||
|
|
|
@ -79,6 +79,7 @@ class phpbb_attachment_upload_test extends \phpbb_database_test_case
|
||||||
'img_create_thumbnail' => true,
|
'img_create_thumbnail' => true,
|
||||||
));
|
));
|
||||||
$config = $this->config;
|
$config = $this->config;
|
||||||
|
$this->phpbb_root_path = $phpbb_root_path;
|
||||||
$this->db = $this->new_dbal();
|
$this->db = $this->new_dbal();
|
||||||
$this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\dummy(), $this->config, $this->db, $phpbb_root_path, $phpEx);
|
$this->cache = new \phpbb\cache\service(new \phpbb\cache\driver\dummy(), $this->config, $this->db, $phpbb_root_path, $phpEx);
|
||||||
$this->request = $this->createMock('\phpbb\request\request');
|
$this->request = $this->createMock('\phpbb\request\request');
|
||||||
|
|
Loading…
Add table
Reference in a new issue