Active
Project:
Boost
Version:
6.x-1.18
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2011 at 07:15 UTC
Updated:
20 Jul 2011 at 07:15 UTC
Hello!
I have "Notice: Undefined index: page_id in boost_expire_node()" in boost.module file
Besides a lot of other notices in this module I was confused with this
$GLOBALS['_boost_router_item'] = isset($GLOBALS['_boost_router_item']) ? $GLOBALS['_boost_router_item'] : _boost_get_menu_router();
$router_item = $GLOBALS['_boost_router_item'];
after that $router_item['page_id'] is used without any conditions for isset, so I assume function _boost_get_menu_router() should always return array with index 'page_id', but it's not
take a look on my menu item in hook_menu
$items['user/profile'] = array(
'title' => 'mymenuitemtitle',
'page callback' => 'mypagecallback',
'access arguments' => array('has account'),
'type' => MENU_CALLBACK,
'weight' => -49,
'file' => 'mymodule.pages.inc',
);
so in function _boost_get_menu_router() menu_get_item called at the beginning
and after 'page_id' added in following cases:
in other cases there won't any "page_id" in array
I made patch from netbeans in attachments. It doesn't contains path to file, so you should use it directly
| Comment | File | Size | Author |
|---|---|---|---|
| boost-module-boost-expire-node.patch | 801 bytes | chingis |