diff --git a/import.php b/import.php index 90bc7a0f3..4f9b6f14e 100644 --- a/import.php +++ b/import.php @@ -351,9 +351,12 @@ if (!$error) { } } +if (! $error && $import_handle !== FALSE) { + fclose($import_handle); +} + // Cleanup temporary file if ($file_to_unlink != '') { - fclose($file_to_unlink); unlink($file_to_unlink); }