mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +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:
parent
bf0e855a9b
commit
296825b87e
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user