Problem/Motivation
explode() PHP error message occurs in the subtheme config settings when using PHP 8.1.
Steps to reproduce
- Launch a local site using PHP 8.1.
- Create a subtheme using bootstrap5 config settings.
- Install the subtheme.
- Go to the subtheme settings.
- The error message will appear.
Proposed resolution
Use the null coalescing operator, introduced in PHP 7, to default the value to an empty string if the value is null.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | after.png | 69.5 KB | mherchel |
| #3 | before.png | 281.54 KB | mherchel |
| #2 | explode-function-deprecated-3276247-1.patch | 672 bytes | jasonfelix |
| Screenshot from 2022-04-19 15-20-29.png | 199.59 KB | jasonfelix |
Issue fork bootstrap5-3276247
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jasonfelix commentedCreated the fix for this issue.
Comment #3
mherchelVerified the error, the patch applies perfectly, and it resolves the error.
Comment #4
amstercadThe patch works for me also. Thank you for the nice, timely work!
Comment #5
jaydee1818 commentedPatch works for me as well. Thanks.
Comment #6
mark lacroix commentedScore another one for this patch! Worked for me, too. Thanks!
Comment #8
vladimirausComment #9
vladimirausThanks everyone!