Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
sqlite database
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2010 at 15:02 UTC
Updated:
10 Sep 2010 at 15:50 UTC
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... :)
| Comment | File | Size | Author |
|---|---|---|---|
| sqlite_substring_index_fix.patch | 666 bytes | berdir |
Comments
Comment #1
Crell commentedIt 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.
Comment #2
chx commentedThe testbot does not cover the SQLite code but this patch is good.
Comment #3
Crell commentedHmph. You are correct. I blame the long night dancing at the bar for my memory lapse.
Comment #4
webchickCommitted to HEAD, thanks! That byte count is hilarious. :D