X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FConsole%2FServerBlock.php;h=46e7b89eb99deb8f48a280768f27c376811f39ad;hb=dfcfae6bcca54a27b1bf5099d96d54f2bba997d3;hp=9ef6777db73d3cf307514922775522c5084ec26c;hpb=1810b32c26683bb94fee10de2ffe18de1a7e85bf;p=friendica.git diff --git a/src/Console/ServerBlock.php b/src/Console/ServerBlock.php index 9ef6777db7..46e7b89eb9 100644 --- a/src/Console/ServerBlock.php +++ b/src/Console/ServerBlock.php @@ -1,6 +1,6 @@ args) < 2 || count($this->args) > 3) { - throw new CommandArgsException('Add needs a domain pattern and optionally a reason.'); + if (count($this->args) != 3) { + throw new CommandArgsException('Add needs a domain pattern and a reason.'); } $pattern = $this->getArgument(1); - $reason = (count($this->args) === 3) ? $this->getArgument(2) : DomainPatternBlocklist::DEFAULT_REASON; + $reason = $this->getArgument(2); $result = $this->blocklist->addPattern($pattern, $reason); if ($result) {