Skip to content

Commit 54a1444

Browse files
committed
Add phpFunction definition
1 parent 125230a commit 54a1444

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Condition/Condition.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ public function isAggregateFunction()
108108
*/
109109
public function setData(array $data)
110110
{
111-
if ($phpFunction = $data[self::PHP_FUNCTION_OPERATOR_NAME][self::FUNCTION_OPERATOR_DEFINITION_NAME]) {
111+
$phpFunction = $data[self::PHP_FUNCTION_OPERATOR_NAME][self::FUNCTION_OPERATOR_DEFINITION_NAME] ?? null;
112+
if ($phpFunction) {
112113
if (!function_exists($phpFunction)) {
113114
throw new ContainerException(sprintf('PHP function "%s" not exists', $phpFunction));
114115
}

0 commit comments

Comments
 (0)