Skip to content

Commit

Permalink
Handle zero-arg aliases correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveRandom committed Feb 17, 2017
1 parent 2c13374 commit ce1540c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Chat/Message/Command.php
Expand Up @@ -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;
Expand Down

0 comments on commit ce1540c

Please sign in to comment.