diff --git a/phpBB/phpbb/storage/adapter/adapter_interface.php b/phpBB/phpbb/storage/adapter/adapter_interface.php index 3208b5efc8..66de8c7dc7 100644 --- a/phpBB/phpbb/storage/adapter/adapter_interface.php +++ b/phpBB/phpbb/storage/adapter/adapter_interface.php @@ -99,9 +99,7 @@ interface adapter_interface /* * Get space available in bytes. * - * @throws \phpbb\storage\exception\exception When unable to retrieve available storage space - * - * @return int Returns available space + * @return mixed Returns available space or null when unable to retrieve available space */ public function free_space(); } diff --git a/phpBB/phpbb/storage/adapter/local.php b/phpBB/phpbb/storage/adapter/local.php index b23d251ee7..3cde5a4fbb 100644 --- a/phpBB/phpbb/storage/adapter/local.php +++ b/phpBB/phpbb/storage/adapter/local.php @@ -432,11 +432,6 @@ class local implements adapter_interface, stream_interface { $free_space = @disk_free_space($this->root_path); - if ($free_space === false) - { - throw new exception('STORAGE_CANNOT_GET_FREE_SPACE'); - } - - return (int) $free_space; + return $free_space; } } diff --git a/phpBB/phpbb/storage/storage.php b/phpBB/phpbb/storage/storage.php index 652b144907..f79b5bc32a 100644 --- a/phpBB/phpbb/storage/storage.php +++ b/phpBB/phpbb/storage/storage.php @@ -43,7 +43,7 @@ class storage protected $factory; /** - * @var string + * @var stringshould be caste */ protected $storage_name; @@ -384,7 +384,7 @@ class storage $this->db->sql_freeresult($result); } - return $number_files; + return (int) $number_files; } /** @@ -392,7 +392,7 @@ class storage * * @throws \phpbb\storage\exception\exception When can't get available space * - * @return int Returns available space + * @return mixed Returns available space or null when unable to retrieve available space */ public function free_space() {