浏览代码

Fixed previous commit to handle the case of arrays

Christophe Coevoet 14 年之前
父节点
当前提交
ee8ad0c4e9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/DependencyInjection/Configuration/Builder/ExprBuilder.php

+ 1 - 1
src/Symfony/Component/DependencyInjection/Configuration/Builder/ExprBuilder.php

@@ -165,7 +165,7 @@ class ExprBuilder
      */
     public function thenInvalid($message)
     {
-        $this->thenPart = function ($v) use ($message) {throw new \InvalidArgumentException(sprintf($message, $v)); };
+        $this->thenPart = function ($v) use ($message) {throw new \InvalidArgumentException(sprintf($message, json_encode($v))); };
 
         return $this;
     }