summaryrefslogtreecommitdiff
path: root/inc/html.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2012-08-24 14:44:32 +0200
committerMichael Hamann <michael@content-space.de>2012-08-24 16:50:07 +0200
commit6d9eab4daacb2af47b0d8c19af63f9420d4c1ee1 (patch)
tree874ebdea8154359e4029bb58dacde623359bf1e1 /inc/html.php
parentc857afe0fad63243c0edb6067c1bb9678d552df0 (diff)
downloadrpg-6d9eab4daacb2af47b0d8c19af63f9420d4c1ee1.tar.gz
rpg-6d9eab4daacb2af47b0d8c19af63f9420d4c1ee1.tar.bz2
Prevent access to undefined variables and make returns consistent in html.php
Diffstat (limited to 'inc/html.php')
-rw-r--r--inc/html.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/html.php b/inc/html.php
index af047a107..0a976e562 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -121,7 +121,7 @@ function html_secedit_get_button($data) {
global $ID;
global $INFO;
- if (!isset($data['name']) || $data['name'] === '') return;
+ if (!isset($data['name']) || $data['name'] === '') return '';
$name = $data['name'];
unset($data['name']);
@@ -718,6 +718,9 @@ function html_recent($first=0, $show_changes='both'){
$form->addElement($date);
$form->addElement(form_makeCloseTag('span'));
+ $diff = false;
+ $href = '';
+
if ($recent['media']) {
$diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && @file_exists(mediaFN($recent['id'])));
if ($diff) {
@@ -1116,7 +1119,7 @@ function html_diff($text='',$intro=true,$type=null){
$r_text = cleanText($text);
$r_head = $lang['yours'];
}else{
- if($rev1 && $rev2){ // two specific revisions wanted
+ if($rev1 && isset($rev2) && $rev2){ // two specific revisions wanted
// make sure order is correct (older on the left)
if($rev1 < $rev2){
$l_rev = $rev1;