File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public function validateFile()
146
146
*/
147
147
public function save ($ destination )
148
148
{
149
- $ fh = fopen ($ destination , 'wb ' ); // TODO: find better way for handling warnings
149
+ $ fh = fopen ($ destination , 'wb ' );
150
150
if (!$ fh ) {
151
151
throw new FileOpenException ('failed to open destination file: ' .$ destination );
152
152
}
@@ -171,7 +171,7 @@ public function save($destination)
171
171
172
172
for ($ i = 1 ; $ i <= $ totalChunks ; $ i ++) {
173
173
$ file = $ this ->getChunkPath ($ i );
174
- $ chunk = fopen ($ file , "rb " ); // TODO: find better way for handling warnings
174
+ $ chunk = fopen ($ file , "rb " );
175
175
176
176
if (!$ chunk ) {
177
177
throw new FileOpenException ('failed to open chunk: ' .$ file );
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class Uploader
14
14
*/
15
15
public static function pruneChunks ($ chunksFolder , $ expirationTime = 172800 )
16
16
{
17
- $ handle = @ opendir ($ chunksFolder ); // TODO: find better way for handling warnings
17
+ $ handle = opendir ($ chunksFolder );
18
18
19
19
if (!$ handle ) {
20
20
throw new FileOpenException ('failed to open folder: ' .$ chunksFolder );
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public function testUploader_pruneChunks()
68
68
public function testUploader_exception ()
69
69
{
70
70
try {
71
- Uploader::pruneChunks ('not/existing/dir ' , 30 );
71
+ @ Uploader::pruneChunks ('not/existing/dir ' , 30 );
72
72
$ this ->fail ();
73
73
} catch (FileOpenException $ e ) {
74
74
$ this ->assertSame ('failed to open folder: not/existing/dir ' , $ e ->getMessage ());
You can’t perform that action at this time.
0 commit comments