Closed (duplicate)
Project:
Boost
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2009 at 06:26 UTC
Updated:
18 Aug 2009 at 09:27 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| boost_page_arguments.patch | 934 bytes | derhasi |
Comments
Comment #1
mikeytown2 commentedDid this patch fix this error? #543734: Error with mysqli_real_escape_string when adding content
Comment #2
derhasi commentedStrange, 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 argumentswas 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.
Comment #3
mikeytown2 commentedthat 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.