Fixed previous commit to handle the case of arrays

This commit is contained in:
Christophe Coevoet 2011-02-15 15:10:15 +01:00 committed by Fabien Potencier
parent 27e2ec139d
commit ee8ad0c4e9

View File

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