mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
SignText: fixed crash when fetching lines of text if not all lines were provided to the constructor
This commit is contained in:
parent
dae2a4ffce
commit
42f543b405
@ -43,7 +43,10 @@ class SignText{
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function __construct(?array $lines = null){
|
||||
$this->setLines($lines ?? array_fill(0, self::LINE_COUNT, ""));
|
||||
$this->lines = array_fill(0, self::LINE_COUNT, "");
|
||||
if($lines !== null){
|
||||
$this->setLines($lines);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user