mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15692] Remove duplicated checks
PHPBB3-15692
This commit is contained in:
parent
115749a9ec
commit
d5df62597b
1 changed files with 0 additions and 10 deletions
|
@ -133,11 +133,6 @@ class local implements adapter_interface, stream_interface
|
||||||
*/
|
*/
|
||||||
public function get_contents($path)
|
public function get_contents($path)
|
||||||
{
|
{
|
||||||
if (!$this->exists($path))
|
|
||||||
{
|
|
||||||
throw new exception('STORAGE_FILE_NO_EXIST', $path);
|
|
||||||
}
|
|
||||||
|
|
||||||
$content = @file_get_contents($this->root_path . $this->get_path($path) . $this->get_filename($path));
|
$content = @file_get_contents($this->root_path . $this->get_path($path) . $this->get_filename($path));
|
||||||
|
|
||||||
if ($content === false)
|
if ($content === false)
|
||||||
|
@ -326,11 +321,6 @@ class local implements adapter_interface, stream_interface
|
||||||
{
|
{
|
||||||
$this->ensure_directory_exists($path);
|
$this->ensure_directory_exists($path);
|
||||||
|
|
||||||
if ($this->exists($path))
|
|
||||||
{
|
|
||||||
throw new exception('STORAGE_FILE_EXISTS', $path);
|
|
||||||
}
|
|
||||||
|
|
||||||
$stream = @fopen($this->root_path . $this->get_path($path) . $this->get_filename($path), 'w+b');
|
$stream = @fopen($this->root_path . $this->get_path($path) . $this->get_filename($path), 'w+b');
|
||||||
|
|
||||||
if (!$stream)
|
if (!$stream)
|
||||||
|
|
Loading…
Add table
Reference in a new issue