#972536: Object of class stdClass could not be converted to int in _menu_router_build() - line 3370 describes a behaviour in Drupal where PHP's array_multisort() sometimes uses the menu item definitions themselves as a secondary sorting mechanism. This can sometimes cause the menu item definitions, which are complex structures, to be used as sorting keys, and trigger an error like:
Object of class stdClass could not be converted to int in _menu_router_build()
Although commerce_addressbook's usage of hook_menu() works fine in most cases, under certain circumstances it will trigger the above error.
The Nodequeue project had a similar problem which was fixed by this commit.
Proposed course of action
Move the callback arguments to the end of the menu item definition in hook_menu, as per this comment on the hook_menu() API page.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2568829-1-commerce_addressbook-reorder-menu-item-keys.patch | 2.95 KB | alberto56 |
Comments
Comment #2
alberto56 CreditAttribution: alberto56 at Dcycle commentedHere is a patch which implements the workaround.