[core] fix error in error handling

This commit is contained in:
Shish
2024-01-04 22:48:56 +00:00
parent b060accc44
commit 48b3de3c6e
5 changed files with 32 additions and 20 deletions

View File

@@ -25,10 +25,7 @@ class RandomImage extends Extension
}
$image = Image::by_random($search_terms);
if (!$image) {
throw new SCoreException(
"Couldn't find any posts randomly",
Tag::implode($search_terms)
);
throw new SCoreException("Couldn't find any posts randomly");
}
if ($action === "download") {