From b57ba3972e27d10f1a612ea7d58a28bc34b42389 Mon Sep 17 00:00:00 2001 From: torqdev <67965755+torqdev@users.noreply.github.com> Date: Mon, 24 Apr 2023 06:05:29 -0300 Subject: [PATCH] Bugfix/null classification store groups (#14909) * check object exists before getting parent * use is_null --------- Co-authored-by: Cameron Jenkins --- models/DataObject/Classificationstore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/DataObject/Classificationstore.php b/models/DataObject/Classificationstore.php index 2506197b38c..c20b688d3f1 100644 --- a/models/DataObject/Classificationstore.php +++ b/models/DataObject/Classificationstore.php @@ -511,7 +511,7 @@ private function getAllDataFromField(callable $mergeFunction): array { $fieldsArray = $mergeFunction($this, []); $object = $this->getObject(); - while (($parent = Service::hasInheritableParentObject($object)) !== null) { + while (!is_null($object) && ($parent = Service::hasInheritableParentObject($object)) !== null) { $fieldDefintions = $parent->getClass()->getFieldDefinitions(); foreach ($fieldDefintions as $key => $fd) { if ($fd instanceof Model\DataObject\ClassDefinition\Data\Classificationstore) {