|
@@ -342,7 +342,7 @@ discard block |
|
|
block discarded – undo |
|
342
|
342
|
unlink($tempfile); |
|
343
|
343
|
$tempfile .= '.zip'; |
|
344
|
344
|
stream_copy_to_stream(fopen($source, 'r'), fopen($tempfile, 'w')); |
|
345
|
|
- register_shutdown_function(function () use ($tempfile) {unlink($tempfile); }); |
|
|
345
|
+ register_shutdown_function(function() use ($tempfile) {unlink($tempfile); }); |
|
346
|
346
|
|
|
347
|
347
|
return self::loadFileZipSource($tempfile); |
|
348
|
348
|
} |
|
@@ -353,7 +353,7 @@ discard block |
|
|
block discarded – undo |
|
353
|
353
|
$tempdir = tempnam(sys_get_temp_dir(), 'datapackage-php'); |
|
354
|
354
|
unlink($tempdir); |
|
355
|
355
|
mkdir($tempdir); |
|
356
|
|
- register_shutdown_function(function () use ($tempdir) {Utils::removeDir($tempdir); }); |
|
|
356
|
+ register_shutdown_function(function() use ($tempdir) {Utils::removeDir($tempdir); }); |
|
357
|
357
|
/* @noinspection PhpUnhandledExceptionInspection File existence is checked afterwards anyway */ |
|
358
|
358
|
$zipper->make($source)->extractTo($tempdir); |
|
359
|
359
|
$zipper->close(); |
Please login to merge, or discard this patch.