Download & Extend

Poll upgrade tests fail on SQLite

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... :)

AttachmentSizeStatusTest resultOperations
sqlite_substring_index_fix.patch666 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 23,312 pass(es).View details

Comments

#1

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.

#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

Status:reviewed & tested by the community» fixed

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

#5

Status:fixed» closed (fixed)

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