summaryrefslogtreecommitdiffstats
path: root/usr/local/www/fbegin.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-03-09 22:02:44 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-03-09 22:02:44 +0000
commit35eef977565cc91dcbeea94c2ed4bd7b55aefd0d (patch)
tree4a156937341c3fc57b112e59e24abfb1651f0d9d /usr/local/www/fbegin.inc
parent6ad262495fa27f3529a54612f135a6ca1311f4e0 (diff)
downloadpfsense-35eef977565cc91dcbeea94c2ed4bd7b55aefd0d.zip
pfsense-35eef977565cc91dcbeea94c2ed4bd7b55aefd0d.tar.gz
Do not foreach item unless its an array
Ticket #865
Diffstat (limited to 'usr/local/www/fbegin.inc')
-rwxr-xr-xusr/local/www/fbegin.inc34
1 files changed, 18 insertions, 16 deletions
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index 035a98d..d2d389c 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -51,23 +51,25 @@ require_once("notices.inc");
if(is_array($requests))
$request_string = implode("&", $requests);
- foreach ($notices as $key => $value) {
- $date = date("m-d-y H:i:s", $key);
- $noticemsg = str_replace("'", "", $value['notice']);
- $noticemsg = str_replace('"', "", $noticemsg);
- $noticemsg = str_replace("\n", "", $noticemsg);
- $noticemsg = str_replace("<p>", "", $noticemsg);
- $noticemsg = str_replace("<pre>", "", $noticemsg);
- $noticemsg = str_replace("</pre>", "", $noticemsg);
- $noticemsg = str_replace("</p>", "", $noticemsg);
- $noticemsg = str_replace("<br>", "", $noticemsg);
- $notice_msgs = '<a href="?noticeaction=acknowledge&noticeid=all">Acknowledge All</a> &nbsp;&nbsp;&nbsp;&nbsp;.:.&nbsp;&nbsp;&nbsp;&nbsp; ';
- if ($value['url']) {
- $notice_msgs .= $date.' - <a href="'.$url.'?'.$request_string.'&noticeaction=acknowledge&noticeid='.$key.'">['.$value['id'].']</a>';
- } else {
- $notice_msgs .= $date.' - <a href="?'.$request_string.'&noticeaction=acknowledge&noticeid='.$key.'">['.$value['id'].']'.$noticemsg.'</a>';
+ if(is_array($notices)) {
+ foreach ($notices as $key => $value) {
+ $date = date("m-d-y H:i:s", $key);
+ $noticemsg = str_replace("'", "", $value['notice']);
+ $noticemsg = str_replace('"', "", $noticemsg);
+ $noticemsg = str_replace("\n", "", $noticemsg);
+ $noticemsg = str_replace("<p>", "", $noticemsg);
+ $noticemsg = str_replace("<pre>", "", $noticemsg);
+ $noticemsg = str_replace("</pre>", "", $noticemsg);
+ $noticemsg = str_replace("</p>", "", $noticemsg);
+ $noticemsg = str_replace("<br>", "", $noticemsg);
+ $notice_msgs = '<a href="?noticeaction=acknowledge&noticeid=all">Acknowledge All</a> &nbsp;&nbsp;&nbsp;&nbsp;.:.&nbsp;&nbsp;&nbsp;&nbsp; ';
+ if ($value['url']) {
+ $notice_msgs .= $date.' - <a href="'.$url.'?'.$request_string.'&noticeaction=acknowledge&noticeid='.$key.'">['.$value['id'].']</a>';
+ } else {
+ $notice_msgs .= $date.' - <a href="?'.$request_string.'&noticeaction=acknowledge&noticeid='.$key.'">['.$value['id'].']'.$noticemsg.'</a>';
+ }
+ $notice_msgs .= " &nbsp;&nbsp;&nbsp;&nbsp;.:.&nbsp;&nbsp;&nbsp;&nbsp; ";
}
- $notice_msgs .= " &nbsp;&nbsp;&nbsp;&nbsp;.:.&nbsp;&nbsp;&nbsp;&nbsp; ";
}
?>
<div id="alerts">
OpenPOWER on IntegriCloud