Skip to content

Commit

Permalink
Concatenator bugfixes #71
Browse files Browse the repository at this point in the history
  • Loading branch information
ctippler authored and dvesh3 committed Dec 21, 2022
1 parent c23b806 commit 5a2ada6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ConfigElement/Operator/Concatenator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function __construct($config, $context = null)
public function getLabeledValue($object)
{
$result = new \stdClass();
$result->value = null;
$result->label = $this->label;

$hasValue = true;
Expand All @@ -46,8 +47,10 @@ public function getLabeledValue($object)
$value = $c->getLabeledValue($object) ? $c->getLabeledValue($object)->value : null;

if (!$hasValue) {
if (!empty($value) || ((method_exists($value, 'isEmpty') && !$value->isEmpty()))) {
$hasValue = true;
if (is_object($value) && method_exists($value, 'isEmpty')) {
$hasValue = !$value->isEmpty();
} else {
$hasValue = !empty($value);
}
}

Expand Down

0 comments on commit 5a2ada6

Please sign in to comment.