0
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-06-29 18:21:07 +00:00

fix(reddit): handle absent search keywords, #4502 (#4542)

This commit is contained in:
Dag 2025-05-08 23:04:12 +02:00 committed by GitHub
parent e364dd1a20
commit e6a84052f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -302,11 +302,10 @@ class RedditBridge extends BridgeAbstract
public static function createUrl($search, $flareInput, $subreddit, bool $user, $section, $time, $queriedContext): string
{
if ($search === '') {
$keywords = '';
} else {
$keywords = $search;
$keywords = str_replace([',', ' '], ' ', $keywords);
$keywords = '';
if ($search) {
$keywords = str_replace([',', ' '], ' ', $search);
$keywords = $keywords . ' ';
}