Project

General

Profile

Revision 7d7b5830

Added by Assos Assos about 9 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/entity/theme/entity.theme.inc
169 169
  $variables['title'] = check_plain(entity_label($entity_type, $entity));
170 170

  
171 171
  $uri = entity_uri($entity_type, $entity);
172
  $variables['url'] = $uri ? url($uri['path'], $uri['options']) : FALSE;
172
  $variables['url'] = $uri && !empty($uri['path']) ? url($uri['path'], $uri['options']) : FALSE;
173 173

  
174 174
  if (isset($variables['elements']['#page'])) {
175 175
    // If set by the caller, respect the page property.
......
177 177
  }
178 178
  else {
179 179
    // Else, try to automatically detect it.
180
    $variables['page'] = $uri && $uri['path'] == $_GET['q'];
180
    $variables['page'] = $uri && !empty($uri['path']) && $uri['path'] == $_GET['q'];
181 181
  }
182 182

  
183 183
  // Helpful $content variable for templates.

Also available in: Unified diff