mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 10:19:39 +00:00
Throw an exception when something attempts to serialize Server (#459)
This commit is contained in:
parent
5332887a0a
commit
c9cf3d5aa4
@ -2434,4 +2434,13 @@ class Server{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when something attempts to serialize the server instance.
|
||||
*
|
||||
* @throws \BadMethodCallException because Server instances cannot be serialized
|
||||
*/
|
||||
public function __sleep(){
|
||||
throw new \BadMethodCallException("Cannot serialize Server instance");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user