mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 10:01:53 +00:00
Player: explicitly check for false return of dataPacket()
fixes a phpstan error on l7 this won't ever actually be a problem, but this isn't obvious from the type system.
This commit is contained in:
parent
a8ec51daac
commit
cf06b5b8cf
@ -3523,7 +3523,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
$pk = new ModalFormRequestPacket();
|
$pk = new ModalFormRequestPacket();
|
||||||
$pk->formId = $id;
|
$pk->formId = $id;
|
||||||
$pk->formData = $formData;
|
$pk->formData = $formData;
|
||||||
if($this->dataPacket($pk)){
|
if($this->dataPacket($pk) !== false){
|
||||||
$this->forms[$id] = $form;
|
$this->forms[$id] = $form;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,11 +45,6 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/pocketmine/Player.php
|
path: ../../../src/pocketmine/Player.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Only booleans are allowed in an if condition, bool\\|int given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/pocketmine/Player.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$haystack of function substr_count expects string, string\\|false given\\.$#"
|
message: "#^Parameter \\#1 \\$haystack of function substr_count expects string, string\\|false given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user