Problem/Motivation
Getting this error while working on PHP8.1 compatibility in Commerce Migrate. See #3270534: Test failures with PHP 8.1.
1) Drupal\Tests\commerce_migrate_ubercart\Functional\uc6\MigrateUpgradeUbercart6Test::testMigrateUpgradeExecute
Exception: Deprecated function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
Drupal\field\Plugin\migrate\process\d6\FieldInstanceSettings->convertSizeUnit()() (Line: 80)process\d6\FieldInstanceSettings->convertSizeUnit() is converting the max_filesize_per_file field setting which in the Ubercart database is a NULL. I then checked imagefield and it turns out that in Drupal 6 the setting max_filesize_per_file can be set to NULL so that case should be handled in core. See https://git.drupalcode.org/project/imagefield/-/blob/6.x-3.x/imagefield.....
Steps to reproduce
Proposed resolution
If max_filesize_per_file is NULL set it to an empty string.
Remaining tasks
Patch, review, commit.
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3270556-5.patch | 4.29 KB | quietone |
| #5 | 3270556-5-fail.patch | 3.27 KB | quietone |
| #2 | 3270556-2.patch | 4.26 KB | quietone |
| #2 | 3270556-2-fail.patch | 3.24 KB | quietone |
Comments
Comment #2
quietone commentedComment #3
quietone commentedComment #4
quietone commentedComment #5
quietone commentedOops, cspell error.
Comment #7
mikelutzSeems reasonable. Not sure why this sat at NR for so long...
Comment #9
mikelutzQueuing the right patch for the testbot.
Comment #10
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x, 9.5.x, 9.4.x, thanks!