[VarDumper] fixes

This commit is contained in:
Nicolas Grekas 2017-06-14 17:32:02 +02:00
parent 78f028cc75
commit d7238c9d96
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class ResourceCaster
public static function castStreamContext($stream, array $a, Stub $stub, $isNested)
{
return stream_context_get_params($stream);
return @stream_context_get_params($stream) ?: $a;
}
public static function castGd($gd, array $a, Stub $stub, $isNested)

View File

@ -86,7 +86,7 @@ class SplCaster
$storage = array();
unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967
foreach ($c as $obj) {
foreach (clone $c as $obj) {
$storage[spl_object_hash($obj)] = array(
'object' => $obj,
'info' => $c->getInfo(),