Преглед на файлове

array_merge Warning, param #2 is not an array

Luciano Andrade преди 7 години
родител
ревизия
691217d412
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

+ 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;
             }