From bdca103af13cf846a195328c69264d3ec632056b Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Fri, 22 May 2015 14:39:25 +0200 Subject: [PATCH] avoid accessing nonexistant array key. fixes #1165 --- inc/html.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 2564c3bd6..2f10e3c08 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1409,7 +1409,13 @@ function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) { // last timestamp is not in changelog, retrieve timestamp from metadata // note: when page is removed, the metadata timestamp is zero - $r_rev = $r_rev ? $r_rev : $INFO['meta']['last_change']['date']; + if(!$r_rev) { + if(isset($INFO['meta']['last_change']['date'])) { + $r_rev = $INFO['meta']['last_change']['date']; + } else { + $r_rev = 0; + } + } //retrieve revisions with additional info list($l_revs, $r_revs) = $pagelog->getRevisionsAround($l_rev, $r_rev); -- GitLab