File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ public function removeAllowedType($type)
134
134
/**
135
135
* Set temporary handle path, eg.: /mnt/storage/, php://temp, php://memory
136
136
*
137
- * @param string $path Set path
137
+ * @param string $path
138
138
* @throws \Inphinit\Exception
139
139
* @throws \Exception
140
140
* @return void
@@ -472,13 +472,14 @@ public function __destruct()
472
472
{
473
473
if ($ this ->temporary ) {
474
474
$ meta_data = stream_get_meta_data ($ this ->temporary );
475
+ $ path = $ meta_data ['uri ' ];
475
476
476
477
fclose ($ this ->temporary );
477
478
478
479
$ this ->temporary = null ;
479
480
480
- if (strpos ($ meta_data [ ' uri ' ] , 'php:// ' ) !== 0 ) {
481
- unlink ($ meta_data [ ' uri ' ] );
481
+ if (strpos ($ path , 'php:// ' ) !== 0 && is_file ( $ path ) ) {
482
+ unlink ($ path );
482
483
}
483
484
}
484
485
You can’t perform that action at this time.
0 commit comments