mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-13 21:05:08 +00:00
LightArray: collect garbage on unserialize
serialize/unserialize don't preserve const refs, so this is necessary to reassign global refs post-unserialize
This commit is contained in:
@ -92,4 +92,9 @@ final class LightArray{
|
||||
public function getData() : string{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function __wakeup(){
|
||||
//const refs aren't preserved when unserializing
|
||||
$this->collectGarbage();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user