Currently, this reads:

/**
* Menu callback for varnish admin settings.
*/
function varnish_admin_reports_page() {
  // connect to varnish and do a full status report
  $status = _varnish_terminal_run('stats');
  foreach($status as $stat) {
    $output .= '<pre>'. $stat['msg'] .'</pre>';
  }
  return $output;
}

The line that starts with $output in the for loop should not have the '.':

    $output = '<pre>'. $stat['msg'] .'</pre>';

It throws notices whenever I try to view that page.

Comments

florisg’s picture

function varnish_admin_reports_page() {
$output = "";
// connect to varnish and do a full status report
$status = _varnish_terminal_run('stats');
foreach($status as $stat) {
$output .= '

'. $stat['msg'] .'

';
}
return $output;
}

^^ get rid of the notice.

Ian Ward’s picture

StatusFileSize
new671 bytes

Attached is a patch which defines output, and keeps the `pre` for formatting sake.

fabsor’s picture

Status: Needs review » Reviewed & tested by the community

Tested. This is certainly good to go =)

fgm’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.15 KB

While we're at it, how about fixing some coding style issues along the way ?

yched’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

fabsor’s picture

Status: Reviewed & tested by the community » Fixed

Commited. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.