Within boost.module, sometimes queries get variables, that are of type (array), so they produce an error message like this:

mysql_real_escape_string() expects parameter 1 to be string, array given in [...]/htdocs/includes/database.mysql.inc on line 395.

This is caused by missing handling in _boost_get_menu_router(). If a router item has multiple arguments, it is reduced to one string argument. But if no string argument is given, but an array of integer arguments, the $router_item['page_arguments'] gets passed as array. This causes the mentioned error.

The attached patch sets $router_item['page_arguments'] = "" for non-string arrays, so this error will not occur.

CommentFileSizeAuthor
boost_page_arguments.patch934 bytesderhasi

Comments

mikeytown2’s picture

derhasi’s picture

Status: Needs review » Closed (duplicate)

Strange, I did a search in the issues for that one, but could not find it.

http://drupal.org/files/issues/boost-543734.1.patch (#543734 comment 3) does a little more than fixing this issue.

The sole reason for the error is that an array for page arguments was returned. With #3 this has been fixed.

I didn't test the patch on the current dev, only a version #543734 wasnot applied, so this might be duplicate.

mikeytown2’s picture

that patch is in the latest dev, so if you could test with the latest dev, or let me know if that patch didn't do the trick.