From 42f543b40525a5edbdc73aae05eead20948cd336 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 29 Jun 2020 19:35:38 +0100 Subject: [PATCH] SignText: fixed crash when fetching lines of text if not all lines were provided to the constructor --- src/block/utils/SignText.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/block/utils/SignText.php b/src/block/utils/SignText.php index a4ab838bb..896f2b827 100644 --- a/src/block/utils/SignText.php +++ b/src/block/utils/SignText.php @@ -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); + } } /**