File tree 1 file changed +3
-9
lines changed
src/Symfony/Component/VarDumper/Cloner
1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -49,17 +49,11 @@ public function __sleep()
49
49
$ properties = [];
50
50
51
51
if (!isset (self ::$ defaultProperties [$ c = \get_class ($ this )])) {
52
- $ defaultProperties = get_class_vars ($ c );
52
+ self :: $ defaultProperties[ $ c ] = get_class_vars ($ c );
53
53
54
- foreach ((new \ReflectionClass ($ c ))->getProperties (\ReflectionProperty::IS_PUBLIC ) as $ v ) {
55
- if ($ v ->isStatic ()) {
56
- unset($ defaultProperties [$ v ->name ]);
57
- } elseif (!isset ($ defaultProperties [$ v ->name ])) {
58
- $ defaultProperties [$ v ->name ] = null ;
59
- }
54
+ foreach ((new \ReflectionClass ($ c ))->getStaticProperties () as $ k => $ v ) {
55
+ unset(self ::$ defaultProperties [$ c ][$ k ]);
60
56
}
61
-
62
- self ::$ defaultProperties [$ c ] = $ defaultProperties ;
63
57
}
64
58
65
59
foreach (self ::$ defaultProperties [$ c ] as $ k => $ v ) {
You can’t perform that action at this time.
0 commit comments