diff --git a/import.php b/import.php index f9d53ad58..73e1223c2 100644 --- a/import.php +++ b/import.php @@ -350,9 +350,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); }