File tree Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -2603,8 +2603,13 @@ public function __sleep()
26032603 *
26042604 * @return void
26052605 */
2606- public function __wakeup ( )
2606+ public function __unserialize ( $ data )
26072607 {
2608+ foreach ($ data as $ property => $ value ) {
2609+ if (property_exists ($ this , $ property )) {
2610+ $ this ->{$ property } = $ value ;
2611+ }
2612+ }
26082613 $ this ->bootIfNotBooted ();
26092614
26102615 $ this ->initializeTraits ();
Original file line number Diff line number Diff line change @@ -160,8 +160,13 @@ public function __sleep()
160160 *
161161 * @return void
162162 */
163- public function __wakeup ( )
163+ public function __unserialize ( $ data )
164164 {
165+ foreach ($ data as $ property => $ value ) {
166+ if (property_exists ($ this , $ property )) {
167+ $ this ->{$ property } = $ value ;
168+ }
169+ }
165170 $ this ->limiter = Container::getInstance ()->make (RateLimiter::class);
166171 }
167172}
Original file line number Diff line number Diff line change @@ -93,9 +93,15 @@ protected function getTimeUntilNextRetry($key)
9393 *
9494 * @return void
9595 */
96- public function __wakeup ( )
96+ public function __unserialize ( $ data )
9797 {
98- parent ::__wakeup ();
98+ foreach ($ data as $ property => $ value ) {
99+ if (property_exists ($ this , $ property )) {
100+ $ this ->{$ property } = $ value ;
101+ }
102+ }
103+
104+ parent ::__unserialize ($ data );
99105
100106 $ this ->redis = Container::getInstance ()->make (Redis::class);
101107 }
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ public function handle()
195195 //
196196 }
197197
198- public function __wakeup ( )
198+ public function __unserialize ( $ data )
199199 {
200200 throw new ModelNotFoundException ('Foo ' );
201201 }
@@ -209,7 +209,7 @@ public function handle()
209209 //
210210 }
211211
212- public function __wakeup ( )
212+ public function __unserialize ( $ data )
213213 {
214214 throw new ModelNotFoundException ('Foo ' );
215215 }
You can’t perform that action at this time.
0 commit comments