Skip to content

Commit

Permalink
Fix argument replacement
Browse files Browse the repository at this point in the history
Error on compiler Reference arguments: On default argument replacement, check the argument is a string before check his length is zero.
  • Loading branch information
neimheadh committed Aug 24, 2020
1 parent d0faf8a commit 4479d97
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -438,7 +438,7 @@ private function replaceDefaultArguments(
$declaredInParent = $parentDefinition && \array_key_exists($index, $parentArguments);
$argumentValue = $declaredInParent ? $parentArguments[$index] : $arguments[$index];

if (null === $argumentValue || 0 === \strlen($argumentValue)) {
if (null === $argumentValue || (\is_string($argumentValue) && 0 === \strlen($argumentValue))) {
$arguments[$declaredInParent ? sprintf('index_%s', $index) : $index] = $value;
}
}
Expand Down

0 comments on commit 4479d97

Please sign in to comment.