diff --git a/src/ConfigElement/Operator/Concatenator.php b/src/ConfigElement/Operator/Concatenator.php index b4003c4..20eb81e 100644 --- a/src/ConfigElement/Operator/Concatenator.php +++ b/src/ConfigElement/Operator/Concatenator.php @@ -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; @@ -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); } }