mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +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:
@ -81,7 +81,7 @@ class PluginDescription{
|
|||||||
throw new PluginException("Invalid PluginDescription main, cannot start within the PocketMine namespace");
|
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"] ?? []));
|
$this->compatibleMcpeProtocols = array_map("intval", (array) ($plugin["mcpe-protocol"] ?? []));
|
||||||
|
|
||||||
if(isset($plugin["commands"]) and is_array($plugin["commands"])){
|
if(isset($plugin["commands"]) and is_array($plugin["commands"])){
|
||||||
|
Reference in New Issue
Block a user