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.

CommentFileSizeAuthor
#3 database.inc_.txt32.12 KBpunch

Comments

punch created an issue. See original summary.

yesmathew’s picture

Thanks @punch, I tried, looks like the function is not getting called -escapeLongIn() / escapeLongInHelper() :(

punch’s picture

StatusFileSize
new32.12 KB

@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?

bohart’s picture

Status: Active » Closed (outdated)

D7 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!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.