backend/pubsub: better 404 handling, do not cause PHP warning when invalid feed id is being requested
This commit is contained in:
parent
d0f7338009
commit
97279fe6ec
|
@ -553,6 +553,8 @@
|
|||
$result = db_query($link, "SELECT feed_url FROM ttrss_feeds
|
||||
WHERE id = '$feed_id'");
|
||||
|
||||
if (db_num_rows($result) != 0) {
|
||||
|
||||
$check_feed_url = db_fetch_result($result, 0, "feed_url");
|
||||
|
||||
if ($check_feed_url && ($check_feed_url == $feed_url || !$feed_url)) {
|
||||
|
@ -581,6 +583,11 @@
|
|||
}
|
||||
} else {
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
echo "404 Not found";
|
||||
}
|
||||
} else {
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
echo "404 Not found";
|
||||
}
|
||||
|
||||
break; // pubsub
|
||||
|
|
Loading…
Reference in New Issue