Skip to content

Commit

Permalink
Fix null as string
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Oct 23, 2024
1 parent cb2fd46 commit dc42531
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,11 @@ protected function checkVariables(string $lineId, string $line, array $vars): ?a
preg_match_all('/\$(' . static::VARIABLE_CHARS . '+)(?!.*:)\\b/', $line, $allMatches);
foreach ($allMatches[1] ?? [] as $var) {
$lessVal = $this->allLessVars[$var] ?? null;
if (isset($vars[$var]) && $vars[$var]['value'] === $this->processSubstitutions('', $lessVal)) {
if (
isset($vars[$var])
&& null !== $lessVal
&& $vars[$var]['value'] === $this->processSubstitutions('', $lessVal)
) {
// Previous definition contains the correct value:
$this->debug("$lineId: $var ok", OutputInterface::VERBOSITY_VERY_VERBOSE);
continue;
Expand Down

0 comments on commit dc42531

Please sign in to comment.