From: Sarah Hoffmann Date: Sat, 24 Nov 2018 11:29:00 +0000 (+0100) Subject: fix variable name in setup --drop X-Git-Tag: v3.3.0~61 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/14cef94e615c3ae9b128a115c7d770f0f075b694 fix variable name in setup --drop --- 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); + } } }