The query sometimes contains two white-spaces in front of IN. escapeLongIn function in database.inc only check for one white-space.
change
private function escapeLongIn($query)
{
return preg_replace_callback("/IN \((.*?)\)/",array($this,'escapeLongInHelper'),$query);
}
to
private function escapeLongIn($query)
{
return preg_replace_callback("/IN[ ]{1,2}\((.*?)\)/",array($this,'escapeLongInHelper'),$query);
}
solve this issue.
| Comment | File | Size | Author |
|---|
Comments
Comment #2
yesmathew commentedThanks @punch, I tried, looks like the function is not getting called -escapeLongIn() / escapeLongInHelper() :(
Comment #3
punch commented@yesmathew, I have just done some testing with +1000 menu items and it worked fine without any errors and no changes to dupals menu.inc(php 5.3.3). What kind of errors do you get and what is the version of your php?
I have included my version of database.inc if you want to try it?
Comment #4
bohartD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.
Everyone can apply the patches/suggestions above (not tested by the maintainers, tested by the community) to their D7 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!