mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
PluginDescription: fix precedence issue with ?? and cast
this would cause issues if the api field was null or not found.
This commit is contained in:
parent
eb0276d459
commit
13fe8ee96d
@ -81,7 +81,7 @@ class PluginDescription{
|
||||
throw new PluginException("Invalid PluginDescription main, cannot start within the PocketMine namespace");
|
||||
}
|
||||
|
||||
$this->api = array_map("strval", (array) $plugin["api"] ?? []);
|
||||
$this->api = array_map("strval", (array) ($plugin["api"] ?? []));
|
||||
$this->compatibleMcpeProtocols = array_map("intval", (array) ($plugin["mcpe-protocol"] ?? []));
|
||||
|
||||
if(isset($plugin["commands"]) and is_array($plugin["commands"])){
|
||||
|
Loading…
x
Reference in New Issue
Block a user