Skip to content

Commit d7238c9

Browse files
[VarDumper] fixes
1 parent 78f028c commit d7238c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/VarDumper/Caster/ResourceCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function castStream($stream, array $a, Stub $stub, $isNested)
4545

4646
public static function castStreamContext($stream, array $a, Stub $stub, $isNested)
4747
{
48-
return stream_context_get_params($stream);
48+
return @stream_context_get_params($stream) ?: $a;
4949
}
5050

5151
public static function castGd($gd, array $a, Stub $stub, $isNested)

src/Symfony/Component/VarDumper/Caster/SplCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $s
8686
$storage = array();
8787
unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967
8888

89-
foreach ($c as $obj) {
89+
foreach (clone $c as $obj) {
9090
$storage[spl_object_hash($obj)] = array(
9191
'object' => $obj,
9292
'info' => $c->getInfo(),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy