Posted by Berdir on August 27, 2010 at 3:02pm
5 followers
Jump to:
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | sqlite database |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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... :)
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| sqlite_substring_index_fix.patch | 666 bytes | Idle | PASSED: [[SimpleTest]]: [MySQL] 23,312 pass(es). | View details |
Comments
#1
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.
#2
The testbot does not cover the SQLite code but this patch is good.
#3
Hmph. You are correct. I blame the long night dancing at the bar for my memory lapse.
#4
Committed to HEAD, thanks! That byte count is hilarious. :D
#5
Automatically closed -- issue fixed for 2 weeks with no activity.