From ed86e9ca9676be39e99c7e14b7adc1c33b630fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 21 Feb 2023 12:56:24 +0100 Subject: [PATCH] Fixed: - added check for empty file name as the export doesn't work without one: `[Error] Argument 1 passed to Friendica\Moderation\DomainPatternBlocklist::exportToFile() must be of the type string, null given, called in /var/www/.../src/Console/ServerBlock.php on line 110` --- src/Console/ServerBlock.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Console/ServerBlock.php b/src/Console/ServerBlock.php index ed9ff5dbde..4d04dcff81 100644 --- a/src/Console/ServerBlock.php +++ b/src/Console/ServerBlock.php @@ -107,6 +107,11 @@ HELP; { $filename = $this->getArgument(1); + if (empty($filename)) { + $this->out('A file name is required, e.g. ./bin/console serverblock export backup.csv'); + return 1; + } + $this->blocklist->exportToFile($filename); // Success