浏览代码

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