Skip to content
Snippets Groups Projects
Commit 960a608c authored by Silvi Sanghavi's avatar Silvi Sanghavi Committed by Sascha Grossenbacher
Browse files

diff-500-errors-possible-infinite-loop-3033455-2

parent 499ae4bc
No related branches found
No related tags found
No related merge requests found
......@@ -235,7 +235,7 @@ class PluginRevisionController extends ControllerBase {
];
$i = 0;
// Find the previous revision.
while ($left_revision_id > $revision_ids[$i]) {
while (!empty($revision_ids[$i]) && $left_revision_id > $revision_ids[$i]) {
$i += 1;
}
if ($i != 0) {
......@@ -250,7 +250,7 @@ class PluginRevisionController extends ControllerBase {
];
// Find the next revision.
$i = 0;
while ($i < $revisions_count && $right_revision_id >= $revision_ids[$i]) {
while (!empty($revision_ids[$i]) && $right_revision_id >= $revision_ids[$i]) {
$i += 1;
}
if ($revisions_count != $i && $revision_ids[$i - 1] != $revision_ids[$revisions_count - 1]) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment