]> git.mxchange.org Git - friendica.git/commitdiff
Fixed:
authorRoland Häder <roland@mxchange.org>
Tue, 21 Feb 2023 11:56:24 +0000 (12:56 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 21 Feb 2023 11:58:50 +0000 (12:58 +0100)
- 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

index ed9ff5dbde44cc0dc6d3a2371a1c1c282a3ea6f2..4d04dcff81e0d23847af76a05fe399728f1ea8b6 100644 (file)
@@ -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