File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -39,4 +39,14 @@ public function __destruct()
3939 @unlink ($ this ->getPath ());
4040 }
4141 }
42+
43+ public function __sleep ()
44+ {
45+ throw new \BadMethodCallException ('Cannot serialize ' .__CLASS__ );
46+ }
47+
48+ public function __wakeup ()
49+ {
50+ throw new \BadMethodCallException ('Cannot unserialize ' .__CLASS__ );
51+ }
4252}
Original file line number Diff line number Diff line change @@ -318,4 +318,9 @@ public function __destruct()
318318 $ this ->clearAll ($ nsKey );
319319 }
320320 }
321+
322+ public function __wakeup ()
323+ {
324+ $ this ->keys = [];
325+ }
321326}
Original file line number Diff line number Diff line change @@ -843,4 +843,10 @@ public function __clone()
843843 }
844844 $ this ->setChildren ($ children );
845845 }
846+
847+ public function __wakeup ()
848+ {
849+ $ this ->cacheKey = bin2hex (random_bytes (16 )); // set 32 hex values
850+ $ this ->cache = new Swift_KeyCache_ArrayKeyCache (new Swift_KeyCache_SimpleKeyCacheInputStream ());
851+ }
846852}
Original file line number Diff line number Diff line change @@ -496,4 +496,14 @@ public function __destruct()
496496 } catch (Exception $ e ) {
497497 }
498498 }
499+
500+ public function __sleep ()
501+ {
502+ throw new \BadMethodCallException ('Cannot serialize ' .__CLASS__ );
503+ }
504+
505+ public function __wakeup ()
506+ {
507+ throw new \BadMethodCallException ('Cannot unserialize ' .__CLASS__ );
508+ }
499509}
You can’t perform that action at this time.
0 commit comments