[Mapbender-commits] r4646 - branches/2.6/lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Sep 17 10:23:48 EDT 2009


Author: verenadiewald
Date: 2009-09-17 10:23:48 -0400 (Thu, 17 Sep 2009)
New Revision: 4646

Modified:
   branches/2.6/lib/database-pgsql.php
Log:
http://trac.osgeo.org/mapbender/ticket/502

Modified: branches/2.6/lib/database-pgsql.php
===================================================================
--- branches/2.6/lib/database-pgsql.php	2009-09-17 14:07:54 UTC (rev 4645)
+++ branches/2.6/lib/database-pgsql.php	2009-09-17 14:23:48 UTC (rev 4646)
@@ -145,6 +145,7 @@
  *  @param		$types (array types as strings)		
  */
 function db_prep_query($qstring, $params, $types){
+	$orig_qstring = $qstring;
 	$ci = new checkInput($qstring,$params,$types);
 	$params = $ci->v; 
 	if(PREPAREDSTATEMENTS == false){
@@ -159,7 +160,11 @@
 			else{
 				$tmp .= "NULL";
 			}
+			
 			$posa = mb_strpos($qstring, $needle);
+ 			if(!$posa) { 
+ 				$e = new mb_exception("Error while preparing statement in ".$_SERVER['SCRIPT_FILENAME']. ": Sql :". $orig_qstring .",Error: parameter '$needle' not found ");
+ 			}
 			$posb = mb_strlen($needle);
 			$qstring = mb_substr($qstring,0,$posa).$tmp.mb_substr($qstring,($posa + $posb));	
 		}



More information about the Mapbender_commits mailing list