api: don't try to pass null login/password when subscribing to feed

This commit is contained in:
Andrew Dolgov 2021-11-23 16:55:21 +03:00
parent 9dabfbfa11
commit a6cad5cbca
1 changed files with 2 additions and 2 deletions

View File

@ -823,8 +823,8 @@ class API extends Handler {
function subscribeToFeed(): bool {
$feed_url = clean($_REQUEST["feed_url"]);
$category_id = (int) clean($_REQUEST["category_id"]);
$login = clean($_REQUEST["login"]);
$password = clean($_REQUEST["password"]);
$login = clean($_REQUEST["login"] ?? "");
$password = clean($_REQUEST["password"] ?? "");
if ($feed_url) {
$rc = Feeds::_subscribe($feed_url, $category_id, $login, $password);