From 14cef94e615c3ae9b128a115c7d770f0f075b694 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 24 Nov 2018 12:29:00 +0100 Subject: [PATCH] fix variable name in setup --drop --- lib/setup/SetupClass.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index f03085f8..5c6d69e4 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -703,15 +703,17 @@ class SetupFunctions if (!$bFound) array_push($aDropTables, $sTable); } foreach ($aDropTables as $sDrop) { - if ($this->sVerbose) echo "dropping table $sDrop\n"; + if ($this->sVerbose) echo "Dropping table $sDrop\n"; @pg_query($this->oDB->connection, "DROP TABLE $sDrop CASCADE"); // ignore warnings/errors as they might be caused by a table having // been deleted already by CASCADE } if (!is_null(CONST_Osm2pgsql_Flatnode_File) && CONST_Osm2pgsql_Flatnode_File) { - if ($sVerbose) echo 'deleting '.CONST_Osm2pgsql_Flatnode_File."\n"; - unlink(CONST_Osm2pgsql_Flatnode_File); + if (file_exists(CONST_Osm2pgsql_Flatnode_File)) { + if ($this->sVerbose) echo 'Deleting '.CONST_Osm2pgsql_Flatnode_File."\n"; + unlink(CONST_Osm2pgsql_Flatnode_File); + } } } -- 2.39.5