mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-26 01:56:41 +00:00
Merge branch '2.x' into 3.x
* 2.x: simplified code fixed a PHP fatal error when calling a macro, imported in the template, in another macro
This commit is contained in:
+1
-5
@@ -266,11 +266,7 @@ class Parser
|
||||
|
||||
public function getImportedSymbol(string $type, string $alias)
|
||||
{
|
||||
foreach ($this->importedSymbols as $functions) {
|
||||
if (isset($functions[$type][$alias])) {
|
||||
return $functions[$type][$alias];
|
||||
}
|
||||
}
|
||||
return $this->importedSymbols[0][$type][$alias] ?? null;
|
||||
}
|
||||
|
||||
public function isMainScope(): bool
|
||||
|
||||
Reference in New Issue
Block a user