[VarDumper] Fixed notice when Exchange is mocked

This commit is contained in:
Grégoire Pineau 2015-03-23 12:13:39 +01:00
parent 1a4d7d7e48
commit b3ed23eadc

View File

@ -105,7 +105,7 @@ class AmqpCaster
$a += array(
$prefix.'name' => $c->getName(),
$prefix.'flags' => self::extractFlags($c->getFlags()),
$prefix.'type' => new ConstStub(self::$exchangeTypes[$c->getType()], $c->getType()),
$prefix.'type' => isset(self::$exchangeTypes[$c->getType()]) ? new ConstStub(self::$exchangeTypes[$c->getType()], $c->getType()) : $c->getType(),
$prefix.'arguments' => $c->getArguments(),
$prefix.'channel' => $c->getChannel(),
$prefix.'connection' => $c->getConnection(),