From 52a028301ff85802acd23272270a26fe640dd3d9 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Tue, 16 Sep 2014 09:45:39 +0000 Subject: [PATCH] Bug fix: FetchAssoc was broken when dealing with in-memory sets. SVN:trunk[3340] --- core/dbobjectset.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/dbobjectset.class.php b/core/dbobjectset.class.php index 7ea951659f..3a98dad37c 100644 --- a/core/dbobjectset.class.php +++ b/core/dbobjectset.class.php @@ -654,7 +654,11 @@ class DBObjectSet else { // Pick the row from the objects added *in memory* - $oRetObj = $this->m_aAddedObjects[$this->m_iCurrRow - $this->m_iNumLoadedDBRows][$sRequestedClassAlias]; + $aRetObjects = array(); + foreach ($this->m_oFilter->GetSelectedClasses() as $sClassAlias => $sClass) + { + $aRetObjects[$sClassAlias] = $this->m_aAddedObjects[$this->m_iCurrRow - $this->m_iNumLoadedDBRows][$sClassAlias]; + } } $this->m_iCurrRow++; return $aRetObjects;