From 092b7683d60c4d6b25213d459346b60a87c21c62 Mon Sep 17 00:00:00 2001 From: Klap-in <klapinklapin@gmail.com> Date: Sat, 3 Aug 2013 15:00:34 +0200 Subject: [PATCH] for negative or zero number of revs to return return empty array by getRevisions --- inc/changelog.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/changelog.php b/inc/changelog.php index 9768fea51..6ff1e0eca 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -460,6 +460,8 @@ function getRevisions($id, $first, $num, $chunk_size=8192, $media=false) { $file = metaFN($id, '.changes'); } $num = max($num, 0); + if ($num == 0) { return $revs; } + $chunk_size = max($chunk_size, 0); if ($first<0) { $first = 0; -- GitLab