Merge branch '3.2'
* 3.2: [VarDumper] ExceptionCaster robustness fix
This commit is contained in:
commit
40d133c29a
@ -1372,7 +1372,6 @@ class ChoiceTypeTest extends BaseTypeTest
|
||||
$form = $this->factory->create(static::TESTED_TYPE, null, array(
|
||||
'multiple' => true,
|
||||
'choices' => array_flip($this->numericChoicesFlipped),
|
||||
'choices_as_values' => true,
|
||||
));
|
||||
|
||||
$form->submit(array(1, 2));
|
||||
|
@ -67,7 +67,7 @@ class ExceptionCaster
|
||||
$prefix = Caster::PREFIX_PROTECTED;
|
||||
$xPrefix = "\0Exception\0";
|
||||
|
||||
if (isset($a[$xPrefix.'previous'], $a[$xPrefix.'trace'])) {
|
||||
if (isset($a[$xPrefix.'previous'], $a[$xPrefix.'trace']) && $a[$xPrefix.'previous'] instanceof \Exception) {
|
||||
$b = (array) $a[$xPrefix.'previous'];
|
||||
self::traceUnshift($b[$xPrefix.'trace'], get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']);
|
||||
$a[$xPrefix.'trace'] = new TraceStub($b[$xPrefix.'trace'], false, 0, -count($a[$xPrefix.'trace']->value));
|
||||
|
Reference in New Issue
Block a user