Recent GIT commit (http://cgit.drupalcode.org/varnish/commit/?id=c141cbe) brake the logic in syntax error style:

@@ -264,26 +249,46 @@ function theme_varnish_status($variables) {
foreach ($status as $terminal => $state) {
list($server, $port) = explode(':', $terminal);
if ($state == VARNISH_SERVER_STATUS_UP) {
- $icon = theme('image', array('path' => 'misc/watchdog-ok.png', 'alt' => t("Server OK: @server:@port", array('@server' => $server, '@port' => $port)), 'title' => "{$server}:{$port}"));
+ $icon = theme('image', array(
+ 'path' => 'misc/watchdog-ok.png',
+ 'alt' => t("Server OK: @server:@port", array(
+ '@server' => $server, '@port' => $port,
+ )
+ ),
+ 'title' => "{$server}:{$port}"),
+ );
$version = $variables['version'];
if ($version < 3) {
$items[] = t('!status_icon Varnish running. Observe more detailed statistics !link.',
- array('!status_icon' => $icon, '!link' => l(t('here'), 'admin/reports/varnish')));
+ array(
+ '!status_icon' => $icon,
+ '!link' => l(t('here'), 'admin/reports/varnish'),
+ )
+ );
}
else {
$items[] = t('!status_icon Varnish running.', array('!status_icon' => $icon));
}
}
else {
- $icon = theme('image', array('path' => 'misc/watchdog-error.png', 'alt' => t("Server down: @server:@port", array('@server' => $server, '@port' => $port)), 'title' => "{$server}:{$port}"));
- $items[] = t('!status_icon The Varnish control terminal is not responding at @server on port @port.', array('!status_icon' => $icon, '@server' => $server, '@port' => $port));
+ $icon = theme('image', array(
+ 'path' => 'misc/watchdog-error.png',
+ 'alt' => t("Server down: @server:@port", array(
+ '@server' => $server, '@port' => $port)
+ ),
+ 'title' => "{$server}:{$port}"));
+ $items[] = t('!status_icon The Varnish control terminal is not responding at @server on port @port.', array(
+ '!status_icon' => $icon,
+ '@server' => $server, '@port' => $port,
+ )
+ );
}
}
return theme('item_list', array('items' => $items));
}
/**
- * Helper function to parse the host from the global $base_url
+ * Helper function to parse the host from the global $base_url.
*/
function _varnish_get_host() {
global $base_url;

This patch fix this issue + double confirm/cleanup with phpcs/coder, tested with 7.x-1.x-dev

CommentFileSizeAuthor
#1 varnish-syntax_error-2455293-1.patch13.97 KBhswong3i
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hswong3i’s picture

Status: Active » Needs review
FileSize
13.97 KB

  • MiSc committed 6e87d71 on authored by hswong3i
    Issue #2455293 by hswong3i: PHP Parse error:  syntax error, unexpected...
MiSc’s picture

Status: Needs review » Fixed

Looks good, committed to latest dev.

Status: Fixed » Closed (fixed)

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