Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2016-07-22 12:31:09 +0300
committerMichal Čihař <michal@cihar.com>2016-07-22 12:31:09 +0300
commit6f8eb0993d1a37f14608b90e433791b723c51085 (patch)
tree59171bea4304ac1f363fc9a646125ee61dac1af2 /libraries
parente8c5cab3c117e68a0d837319e0e83bdfc50be1fb (diff)
Delete temporary file before reporting error
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/plugins/import/ImportShp.class.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/libraries/plugins/import/ImportShp.class.php b/libraries/plugins/import/ImportShp.class.php
index 6fa9ac9c28..c5b3cc2124 100644
--- a/libraries/plugins/import/ImportShp.class.php
+++ b/libraries/plugins/import/ImportShp.class.php
@@ -148,6 +148,14 @@ class ImportShp extends ImportPlugin
}
}
+ // Delete the .dbf file extracted to 'TempDir'
+ if ($temp_dbf_file
+ && isset($dbf_file_path)
+ && file_exists($dbf_file_path)
+ ) {
+ unlink($dbf_file_path);
+ }
+
// Load data
$shp->loadFromFile('');
if ($shp->lastError != "") {
@@ -159,14 +167,6 @@ class ImportShp extends ImportPlugin
return;
}
- // Delete the .dbf file extracted to 'TempDir'
- if ($temp_dbf_file
- && isset($dbf_file_path)
- && file_exists($dbf_file_path)
- ) {
- unlink($dbf_file_path);
- }
-
$esri_types = array(
0 => 'Null Shape',
1 => 'Point',
@@ -340,4 +340,4 @@ class ImportShp extends ImportPlugin
$buffer = substr($buffer, $length);
return $result;
}
-} \ No newline at end of file
+}