Skip to content

Commit

Permalink
Update AbstractEntity.php
Browse files Browse the repository at this point in the history
Fixed the validation of the getUuid existence in the exchangeArray method.
  • Loading branch information
ruslanbaidan authored Feb 13, 2024
1 parent 1dfa885 commit f10274c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model/Entity/AbstractEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ public function exchangeArray(array $options, $partial = false)
if (!$this->squeezeAutoPositionning && isset($this->parameters['implicitPosition']['field'])) {
$parent_before = $this->get($this->parameters['implicitPosition']['field']);
if (is_object($parent_before)) {
$parent_before = !$parent_before instanceof AnrSuperClass && $parent_before->getUuid() !== null
? $parent_before->getUuid()
$parent_before = !$parent_before instanceof AnrSuperClass && $parent_before->get('uuid') !== null
? $parent_before->get('uuid')
: $parent_before->get('id');
}
$parent_after = array_key_exists($this->parameters['implicitPosition']['field'], $options) ? $options[$this->parameters['implicitPosition']['field']] : null;
Expand Down

0 comments on commit f10274c

Please sign in to comment.