1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 22:00:23 +02: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

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 . ' ';
}