From 8578bacd27a0f1bf7f987b27aae63f93ad9c4a77 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 27 Jan 2009 16:33:38 +0000 Subject: [PATCH] Report #140: Call to non present announcement or news number [read all] --- root/portal/block/announcements.php | 1 + root/portal/block/news.php | 1 + 2 files changed, 2 insertions(+) diff --git a/root/portal/block/announcements.php b/root/portal/block/announcements.php index 61fc4bd1..588eb688 100644 --- a/root/portal/block/announcements.php +++ b/root/portal/block/announcements.php @@ -19,6 +19,7 @@ if (!defined('IN_PORTAL')) } $announcement = request_var('announcement', -1); +$announcement = ($announcement > $portal_config['portal_number_of_announcements']) ? -1 : $announcement; $start = request_var('ap', 0); $start = ($start < 0) ? 0 : $start; diff --git a/root/portal/block/news.php b/root/portal/block/news.php index 2430bc37..6b5b2b6d 100644 --- a/root/portal/block/news.php +++ b/root/portal/block/news.php @@ -21,6 +21,7 @@ if (!defined('IN_PORTAL')) } $news = request_var('news', -1); +$news = ($news > $portal_config['portal_number_of_news']) ? -1 : $news; $user->add_lang('viewforum'); $start = request_var('np', 0); $start = ($start < 0) ? 0 : $start;