diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index 4c4743c6a9..b547ed97e8 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -2710,7 +2710,7 @@ public function enterAnonymousFunction( } $variableTypes[$variableName] = VariableTypeHolder::createYes($variableType); foreach ($this->moreSpecificTypes as $exprString => $moreSpecificType) { - $matches = \Nette\Utils\Strings::matchAll($exprString, '#^\$([a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*)#'); + $matches = \Nette\Utils\Strings::matchAll((string) $exprString, '#^\$([a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*)#'); if ($matches === []) { continue; }