Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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 CreditAttribution: chx commentedThe testbot does not cover the SQLite code but this patch is good.
Comment #3
Crell CreditAttribution: 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