]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/cmd.php
allow parameters to be empty
[nominatim.git] / lib / cmd.php
index 0c9201a81b4023a4a2dcc3f39584dba0b990ec66..c73074a18517d2674e8fc80debdf7caa89b72ea6 100644 (file)
                echo "\n";
                exit;
        }
+
+       function chksql($oSql, $sMsg = false)
+       {
+               if (PEAR::isError($oSql))
+               {
+                       fail($sMsg || $oSql->getMessage(), $oSql->userinfo);
+               }
+
+               return $oSql;
+       }