Skip to content

Commit

Permalink
fix pass by reference bug identified by scrutinizer
Browse files Browse the repository at this point in the history
$pagelog->getRevisions(-1, 1) cannot be passed to array_pop() as the
parameter $array expects a reference.
  • Loading branch information
splitbrain committed Feb 3, 2017
1 parent 2d90435 commit 7063539
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/html.php
Expand Up @@ -551,7 +551,8 @@ function html_revisions($first=0, $media_id = false){
}
}
$pagelog = new PageChangeLog($ID);
$latestrev = array_pop($pagelog->getRevisions(-1, 1));
$latestrev = $pagelog->getRevisions(-1, 1);
$latestrev = array_pop($latestrev);
$href = wl($id,"rev=$latestrev",false,'&');
$summary = $INFO['sum'];
$editor = $INFO['editor'];
Expand Down

0 comments on commit 7063539

Please sign in to comment.