Ver Fonte

array_merge Warning, param #2 is not an array

Luciano Andrade há 7 anos atrás
pai
commit
691217d412

+ 1 - 1
DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

@@ -359,7 +359,7 @@ class AddDependencyCallsCompilerPass implements CompilerPassInterface
         $pos = 0;
         foreach ($definition->getMethodCalls() as $method) {
             if ($method[0] == 'setTemplates') {
-                $definedTemplates = array_merge($definedTemplates, $method[1][0]);
+                $definedTemplates = array_merge($definedTemplates, (array)$method[1][0]);
 
                 continue;
             }