Commit 409c8f55 authored by Nicholas Thompson's avatar Nicholas Thompson
Browse files

#1228006 - Fixing error with the menu page arguments being serialized on a...

#1228006 - Fixing error with the menu page arguments being serialized on a 403, causing array_shift errors.
parent 5f5bb315
......@@ -13,8 +13,16 @@ function views_page_title_pattern_alter(&$pattern, &$types) {
$menu = menu_get_item();
if ($menu['page_callback'] == 'views_page') {
// Get the args, name and display_id
// Get the args from the menu router
$args = $menu['page_arguments'];
// On a 403, the $args remain unserialized. In the event of this happening
// I think we would rather abort here than tread in uncerain waters.
if (!is_array($args)) {
return FALSE;
}
// Strip the name and display_id out so we're left with Views Args
$name = array_shift($args);
$display_id = array_shift($args);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment