I hope this time, it's really an easy one :)

Someone the substring_index replacement function for sqlite does get called with empty string during the upgrade process and it doesn't like this because of this line:

$end = strpos($string, $delimiter, $end + 1);

In case of an empty string, this translates to strpos('', '/', 1) and then strpos() complains that it offset is bigger than the string length.

Patch checks if $string is empty and returns an empty string then.

Hm, evil patch... :)

Files: 
CommentFileSizeAuthor
sqlite_substring_index_fix.patch666 bytesBerdir
PASSED: [[SimpleTest]]: [MySQL] 23,312 pass(es). View

Comments

Crell’s picture

Status: Needs review » Reviewed & tested by the community

It is so fitting that a patch to poll.module would be 666 bytes...

The patch looks good to me visually. Testbot can disagree if it wants to.

chx’s picture

The testbot does not cover the SQLite code but this patch is good.

Crell’s picture

Hmph. You are correct. I blame the long night dancing at the bar for my memory lapse.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD, thanks! That byte count is hilarious. :D

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.