Problem/Motivation
exif_custom automated tests expose an issue when using PHP 8.1.
https://www.drupal.org/pift-ci-job/2333429
Fix it by making a small change, should be easy to do.
exception: [Deprecated function] Line 153 of sites/all/modules/file_entity/file_entity.pages.inc:
explode(): Passing null to parameter #2 ($string) of type string is deprecated
✓ - testProcess
✗
file_entity_validate_size_extensions
exception: [Deprecated function] Line 230 of sites/all/modules/file_entity/file_entity.pages.inc:
explode(): Passing null to parameter #2 ($string) of type string is deprecated
line 153 and line 230 of file_entity.pages.inc
Proposed resolution
create a patch (easy)
Remaining tasks
Create a patch (easy)
User interface changes
N/A
API changes
Minor
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | file_entity-php81_compatibility-3267961-06.patch | 1.56 KB | joseph.olstad |
Comments
Comment #2
joseph.olstadComment #3
joseph.olstadComment #4
joseph.olstadComment #6
joseph.olstadNew patch, oops on the other one
Comment #7
joseph.olstadComment #10
joseph.olstadI needed to commit this to trigger exif_custom automated tests.
Comment #11
joseph.olstadComment #12
joseph.olstadyes I know I could have made a fancier fix, like cast the variable_get call to a string
(string) variable_get('blah')
however I did it in a simple way that should be highly compatible with all versions of PHP.
I don't think there's much of a performance concern for this particular section of code anyway.
Comment #14
joseph.olstadvery strange, automated tests now show 24 fails for PHP 8.1 ???.
Comment #15
joseph.olstadComment #16
joseph.olstadComment #17
joseph.olstadComment #18
joseph.olstadThe problem is not file_entity, the problem is caused by changes made to the ci test runner.
#3294386: All of D7 contrib project tests failing (with Composer 2)