// Further down are some assumptions that $block is a 0-indexed array
// with (count-1) as last key. Let's make sure it is.
$block = array_values( $block );
+ if ( empty( $block ) ) {
+ // if we can't show anything, don't display this block altogether
+ return '';
+ }
$r .= $this->getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden );
* @return string
*/
protected function getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden ) {
+ if ( empty( $block ) ) {
+ return '';
+ }
+
# Changes message
static $nchanges = array();
static $sinceLastVisitMsg = array();