0013298: "Setup Admin undefined" when updating Tinebase 10.9 ? 10.28
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 3 Jul 2017 19:19:52 +0000 (21:19 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 5 Jul 2017 07:44:31 +0000 (09:44 +0200)
https://forge.tine20.org/view.php?id=13298

Change-Id: I2dd54cc256dff31fa10f9383806df184f41ebbfd
Reviewed-on: http://gerrit.tine20.com/customers/5001
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Relations.php

index 3080f13..603ee91 100644 (file)
@@ -631,6 +631,12 @@ class Tinebase_Relations
             if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ .
                 " Resolving " . count($relations) . " relations");
 
+            if (! $records instanceof Tinebase_Record_RecordSet) {
+                if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ .
+                    " No recordset found");
+                return;
+            }
+
             /** @var Tinebase_Model_Relation $relation */
             foreach ($relations as $relation) {
                 $recordIndex    = $records->getIndexById($relation->related_id);