@@ 206-209 (lines=4) @@ | ||
203 | throw new Exception( $error['message'] ); |
|
204 | } |
|
205 | ||
206 | if( fwrite( $stream, $content ) === false ) { |
|
207 | $error = error_get_last(); |
|
208 | throw new Exception( $error['message'] ); |
|
209 | } |
|
210 | ||
211 | if( rewind( $stream ) === false ) { |
|
212 | $error = error_get_last(); |
|
@@ 211-214 (lines=4) @@ | ||
208 | throw new Exception( $error['message'] ); |
|
209 | } |
|
210 | ||
211 | if( rewind( $stream ) === false ) { |
|
212 | $error = error_get_last(); |
|
213 | throw new Exception( $error['message'] ); |
|
214 | } |
|
215 | ||
216 | return $stream; |
|
217 | } |
|
@@ 252-255 (lines=4) @@ | ||
249 | */ |
|
250 | public function writes( $path, $stream ) |
|
251 | { |
|
252 | if( ( $content = @fread( $stream, 0x7fffffff ) ) === false ) { |
|
253 | $error = error_get_last(); |
|
254 | throw new Exception( $error['message'] ); |
|
255 | } |
|
256 | ||
257 | try { |
|
258 | $content = $this->fs->put( $path, $content ); |