diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Core/ObjectStorage/FileStorage.php | 5 | ||||
-rw-r--r-- | app/Core/ObjectStorage/ObjectStorageInterface.php | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/Core/ObjectStorage/FileStorage.php b/app/Core/ObjectStorage/FileStorage.php index fa1efe21..75160e79 100644 --- a/app/Core/ObjectStorage/FileStorage.php +++ b/app/Core/ObjectStorage/FileStorage.php @@ -53,7 +53,6 @@ class FileStorage implements ObjectStorageInterface * @access public * @param string $key * @param string $blob - * @return string */ public function put($key, &$blob) { @@ -78,7 +77,7 @@ class FileStorage implements ObjectStorageInterface throw new ObjectStorageException('File not found: '.$filename); } - return readfile($filename); + readfile($filename); } /** @@ -141,7 +140,7 @@ class FileStorage implements ObjectStorageInterface */ private function createFolder($key) { - $folder = $this->path.DIRECTORY_SEPARATOR.dirname($key); + $folder = strpos($key, '/') !== false ? $this->path.DIRECTORY_SEPARATOR.dirname($key) : $this->path; if (! is_dir($folder) && ! mkdir($folder, 0755, true)) { throw new ObjectStorageException('Unable to create folder: '.$folder); diff --git a/app/Core/ObjectStorage/ObjectStorageInterface.php b/app/Core/ObjectStorage/ObjectStorageInterface.php index 180bdf86..48444d2d 100644 --- a/app/Core/ObjectStorage/ObjectStorageInterface.php +++ b/app/Core/ObjectStorage/ObjectStorageInterface.php @@ -25,7 +25,6 @@ interface ObjectStorageInterface * @access public * @param string $key * @param string $blob - * @return string */ public function put($key, &$blob); |