[Mapbender-commits] r8779 - branches/2.7/http/classes trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Feb 17 04:41:26 PST 2014


Author: verenadiewald
Date: 2014-02-17 04:41:26 -0800 (Mon, 17 Feb 2014)
New Revision: 8779

Modified:
   branches/2.7/http/classes/class_wfs_conf.php
   trunk/mapbender/http/classes/class_wfs_conf.php
Log:
check if function param is an array to avoid permanent logging of PHP Warning:  Invalid argument supplied for foreach()

Modified: branches/2.7/http/classes/class_wfs_conf.php
===================================================================
--- branches/2.7/http/classes/class_wfs_conf.php	2014-02-17 10:40:06 UTC (rev 8778)
+++ branches/2.7/http/classes/class_wfs_conf.php	2014-02-17 12:41:26 UTC (rev 8779)
@@ -94,6 +94,9 @@
 	 */
 	private static function getWfsConfFromDbByArray ($idArray) {
 		$rowArray = array();
+		if(!is_array($idArray)) {
+			return $rowArray;
+		}
         foreach ($idArray as $id) {
         		$sql = "SELECT * FROM wfs_conf ";
                 $sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";

Modified: trunk/mapbender/http/classes/class_wfs_conf.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_conf.php	2014-02-17 10:40:06 UTC (rev 8778)
+++ trunk/mapbender/http/classes/class_wfs_conf.php	2014-02-17 12:41:26 UTC (rev 8779)
@@ -94,6 +94,9 @@
 	 */
 	private static function getWfsConfFromDbByArray ($idArray) {
 		$rowArray = array();
+		if(!is_array($idArray)) {
+			return $rowArray;
+		}
         foreach ($idArray as $id) {
         		$sql = "SELECT * FROM wfs_conf ";
                 $sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";



More information about the Mapbender_commits mailing list