Bugfix
authorCameron Ball <cameron@getapproved.com.au>
Thu, 19 Feb 2015 06:12:27 +0000 (14:12 +0800)
committerCameron Ball <cameron@getapproved.com.au>
Thu, 19 Feb 2015 06:12:27 +0000 (14:12 +0800)
DataAccess/DataMapper/Helpers/VOMapsHelper.php

index 575d95e..61c7d4a 100644 (file)
@@ -53,7 +53,7 @@ class VOMapsHelper
         // If the table we already have contains the id of a row we need in\r
         // another table        \r
         //if(isset($row[$this->_tableName . '_id'])) {\r
-        if(array_key_exists($this->_tableName . '_id', $row)) { //this is a better choice as somtimes the array key is set, but is equal to null, and isset doesn't like that\r
+        if($row && array_key_exists($this->_tableName . '_id', $row)) { //this is a better choice as somtimes the array key is set, but is equal to null, and isset doesn't like that\r
             $join_id = $row[$this->_tableName . '_id'];\r
             $statement = $db->prepare(sprintf('SELECT * from %s WHERE id=%u',\r
                 $table,\r