summaryrefslogtreecommitdiff
path: root/classes/handler/public.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-12 22:00:33 +0300
committerAndrew Dolgov <[email protected]>2021-02-12 22:00:33 +0300
commitd3940b625962048b6a7f951ba76f872ce2c1f6d2 (patch)
tree1a095110fc8482fd51e226446db2f8822b45c48c /classes/handler/public.php
parent481bd7610059cfa09282a03e1a9c8dbc213f4819 (diff)
fix a bunch of warnings related to generated feeds
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-xclasses/handler/public.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index fca471122..db8a924ad 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -163,7 +163,7 @@ class Handler_Public extends Handler {
$tpl->addBlock('feed');
$tpl->generateOutputToString($tmp);
- if (@!clean($_REQUEST["noxml"])) {
+ if (empty($_REQUEST["noxml"])) {
header("Content-Type: text/xml; charset=utf-8");
} else {
header("Content-Type: text/plain; charset=utf-8");
@@ -460,19 +460,17 @@ class Handler_Public extends Handler {
function rss() {
$feed = clean($_REQUEST["id"]);
$key = clean($_REQUEST["key"]);
- $is_cat = clean($_REQUEST["is_cat"]);
- $limit = (int)clean($_REQUEST["limit"]);
- $offset = (int)clean($_REQUEST["offset"]);
+ $is_cat = clean($_REQUEST["is_cat"] ?? false);
+ $limit = (int)clean($_REQUEST["limit"] ?? 0);
+ $offset = (int)clean($_REQUEST["offset"] ?? 0);
- $search = clean($_REQUEST["q"]);
- $view_mode = clean($_REQUEST["view-mode"]);
- $order = clean($_REQUEST["order"]);
- $start_ts = clean($_REQUEST["ts"]);
+ $search = clean($_REQUEST["q"] ?? "");
+ $view_mode = clean($_REQUEST["view-mode"] ?? "");
+ $order = clean($_REQUEST["order"] ?? "");
+ $start_ts = (int)clean($_REQUEST["ts"] ?? 0);
- $format = clean($_REQUEST['format']);
- $orig_guid = clean($_REQUEST["orig_guid"]);
-
- if (!$format) $format = 'atom';
+ $format = clean($_REQUEST['format'] ?? "atom");
+ $orig_guid = clean($_REQUEST["orig_guid"] ?? false);
if (SINGLE_USER_MODE) {
UserHelper::authenticate("admin", null);