Changed method loadTree of DB_Model to be compatible to older php versions than 5.5

This commit is contained in:
bison-paolo
2017-02-09 11:01:29 +01:00
parent b7c359618b
commit 8d9a8b6478
+3 -1
View File
@@ -313,7 +313,9 @@ class DB_Model extends FHC_Model
}
// If the side table has data. If it was used a left join all the properties could be null
if (!empty(array_filter(get_object_vars($sideTableObj))))
// NOTE: Keep this way to be compatible with a php version older than 5.5
$tmpFilteredArray = array_filter(get_object_vars($sideTableObj));
if (isset($tmpFilteredArray) && count($tmpFilteredArray) > 0)
{
if (($k = $this->findMainTable($mainTableObj, $returnArray)) === false)
{