"Unsupported operands" thrown in drupal_get_breadcrumb when search404's page is rendered
| Project: | Search 404 |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | jp.stacey |
| Status: | closed |
Jump to:
Search404 plain doesn't work for us, and I'm not sure why.
In between search404_page() returning, and the page.tpl.php rendering, I get the error:
Fatal error: Unsupported operand types in /var/www/drupal-6/includes/common.inc on line 1445
Poking around in menu.inc, this seems to be because drupal_get_breadcrumb() calls menu_get_active_trail() and from that menu_get_item(), which is working off the missing page path, not /search404. Because the missing page doesn't exist in the menu_router table (obviously) then this returns a FALSE. When that bubbles up as far as the breadcrumb generation, then l() gets a third parameter that isn't an array, and the error above is thrown.
Shouldn't search404 handle the fact that the non-existent page won't be in menu_router? There's some code saying "EVIL HAXX" (!) that seems to be doing some sort of $_GET['q'] swapping, but I assume it can't be working properly.
Here's our setup:
Search404 6.1-1.1
Drupal 6.6
PHP 5.2.6

#1
Does this error show up in all the 404 searches or some specific instance?
Could you also post the URL that causes this error?
Thanks
Zyxware
#2
#3
All 404ed URLs cause this error.
As I say, it happens after the MENU_CALLBACK in the module; so when I then navigate to a page that does exist I see e.g:
#4
@zyxware: looks like this was a combinatorial bug, caused by a stub module. It was only running a few drupal_set_html_head()s in its _init() hook, but there might have been some knock-on effect. But we'll look into it at our end, so I think this bug can be closed. Sorry if I wasted your time!
#5
No issues jp.stacey, glad you found the root cause of the issue.
We are closing the bug from our side.
Regards
Zyxware
#6
#7
Getting the same problem now:
Fatal error: Unsupported operand types in /var/www/vhosts/domain.com/httpdocs/includes/common.inc on line 1552Also caused by menu_get_active_trail(), eventually a l(, , ) function is called without any arguments resulting in above error. Where to look for an answer to this problem? Why does l(, , ) eventually end up like that?
If its a conflicting module like said above, then how to find out which one?
#8
Just found out it's being caused by ApacheSolr, so they need to fix it.