From ce1540ccd57a42949860e449c43f1d3b63bbcdf4 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Fri, 17 Feb 2017 14:50:41 +0000 Subject: [PATCH] Handle zero-arg aliases correctly --- src/Chat/Message/Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Chat/Message/Command.php b/src/Chat/Message/Command.php index 1e1f605..541a7c8 100644 --- a/src/Chat/Message/Command.php +++ b/src/Chat/Message/Command.php @@ -68,7 +68,7 @@ public function hasParameters(int $minCount = -1): bool public function getText(): string { if (!isset($this->text)) { - $this->text = ltrim(substr(parent::getText(), strlen($this->commandName) + 2)); + $this->text = ltrim(substr(parent::getText(), strlen($this->commandName) + 2) ?: ''); } return $this->text;