Skip to content

Commit 603b46d

Browse files
committed
fix templating helper __toString config check - #155
1 parent 294c5d7 commit 603b46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Templating/Helper/JsConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function __toString(): string
136136
];
137137

138138
foreach ($this->variables as $index => $varKey) {
139-
if (array_key_exists($varKey, $this->config) && is_countable($this->config[$varKey]) && count($this->config[$varKey]) > 0) {
139+
if (is_array($this->config[$varKey] ?? null) && count($this->config[$varKey]) > 0) {
140140
$values = $this->config[$varKey];
141141
} else {
142142
$values = new \stdClass();

0 commit comments

Comments
 (0)