]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/setup.php
fix variable reference
[nominatim.git] / utils / setup.php
index b71e07e0b8c49628603f3234053d3b8953d12778..4d2ea8029aa7bba5cf17625a2f2a03ddd4e09573 100755 (executable)
@@ -950,9 +950,12 @@ function checkModulePresence()
 {
     // Try accessing the C module, so we know early if something is wrong
     // and can simply error out.
+    global $sModulePath;
     $sSQL = "CREATE FUNCTION nominatim_test_import_func(text) RETURNS text AS '";
     $sSQL .= $sModulePath."/nominatim.so', 'transliteration' LANGUAGE c IMMUTABLE STRICT";
     $sSQL .= ';DROP FUNCTION nominatim_test_import_func(text);';
+
+    $oDB =& getDB();
     $oResult = $oDB->query($sSQL);
 
     $bResult = true;