Skip to content

Commit

Permalink
Bugfix/null classification store groups (#14909)
Browse files Browse the repository at this point in the history
* check object exists before getting parent

* use is_null

---------

Co-authored-by: Cameron Jenkins <cameron.jenkins@torqit.ca>
  • Loading branch information
torqdev and cameronfromtorq committed Apr 24, 2023
1 parent a17a73d commit b57ba39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/DataObject/Classificationstore.php
Expand Up @@ -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) {
Expand Down

0 comments on commit b57ba39

Please sign in to comment.