mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
AttributeMap: be aware of possible NULL offset in ArrayAccess
reported by phpstan 0.12.17
This commit is contained in:
parent
517f9a3c3a
commit
d4dc1c8a0c
@ -71,10 +71,13 @@ class AttributeMap implements \ArrayAccess{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $offset
|
||||
* @param float $value
|
||||
* @param int|null $offset
|
||||
* @param float $value
|
||||
*/
|
||||
public function offsetSet($offset, $value) : void{
|
||||
if($offset === null){
|
||||
throw new \InvalidArgumentException("Array push syntax is not supported");
|
||||
}
|
||||
$this->attributes[$offset]->setValue($value);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user