| @@ -176,9 +176,9 @@ | ||
| 176 | 176 | { |
| 177 | 177 | $path = $this->getRelativePath( $path ); |
| 178 | 178 | $location = $this->applyPathPrefix($path); |
| 179 | 179 | $this->ensureDirectory(dirname($location)); |
| 180 | - $stream = fopen($location, 'w+b'); | |
| 180 | + $stream = @fopen($location, 'w+b'); | |
| 181 | 181 | |
| 182 | 182 | if ( ! $stream || stream_copy_to_stream($resource, $stream) === false || ! fclose($stream)) { |
| 183 | 183 | return false; |
| 184 | 184 | } |
| @@ -200,9 +200,9 @@ | ||
| 200 | 200 | public function readStream($path) |
| 201 | 201 | { |
| 202 | 202 | $path = $this->getRelativePath( $path ); |
| 203 | 203 | $location = $this->applyPathPrefix($path); |
| 204 | - $stream = fopen($location, 'rb'); | |
| 204 | + $stream = @fopen($location, 'rb'); | |
| 205 | 205 | |
| 206 | 206 | return ['type' => 'file', 'path' => $path, 'stream' => $stream]; |
| 207 | 207 | } |
| 208 | 208 | |
| @@ -357,9 +357,9 @@ | ||
| 357 | 357 | { |
| 358 | 358 | $path = $this->getRelativePath( $path ); |
| 359 | 359 | $location = $this->applyPathPrefix($path); |
| 360 | 360 | $finfo = new Finfo(FILEINFO_MIME_TYPE); |
| 361 | - $mimetype = $finfo->file($location); | |
| 361 | + $mimetype = @$finfo->file($location); | |
| 362 | 362 | |
| 363 | 363 | if (in_array($mimetype, ['application/octet-stream', 'inode/x-empty', 'application/x-empty'])) { |
| 364 | 364 | $mimetype = Util\MimeType::detectByFilename($location); |
| 365 | 365 | } |