Problem/Motivation
Having an error for Drupal 9.3.x under PHP 8.1
While installing module with custom storage fields
Proposed resolution
Not to pass any NULL value to the hash function in any config import case
Have ?? '' for all passed 2nd argument values into the hash function
Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ➖ Testing to ensure no regression
- ➖ Automated unit testing coverage
- ➖ Automated functional testing coverage
- ➖ UX/UI designer responsibilities
- ➖ Readability
- ➖ Accessibility
- ➖ Performance
- ➖ Security
- ➖ Documentation
- ➖ Code review by maintainers
- ➖ Full testing and approval
- ➖ Credit contributors
- ➖ Review with the product owner
- ➖ Release notes snippet
- ❌ Release
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3272720-6.patch | 2.09 KB | paulmicha |
Issue fork drupal-3272720
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 #3
rajab natshahComment #4
rajab natshahComment #5
larowlanWhat are the steps to reproduce this?
Comment #7
paulmicha commentedHere are the contents of the merge request as a patch file.
Comment #8
Letharion commentedI'm seeing this warning when visiting core/install.php and the site is already installed.
With that said, I'm wondering if it's actually correct that getUniqueStorageIdentifier() can return null under reasonable circumstances?
I'm not sure the correct solution here is to silence the error really with ?? '', as there should probably always be an identifier?
Comment #10
solideogloria commentedRemoving blockquote on deprecated hashing functions, as that has nothing to do with this issue.
Comment #11
larowlanYep, we're going to need a stack trace here, I suspect something is corrupt in your site, perhaps in your config
Comment #12
avpadernoComment #13
jayelless commentedI have just upgraded my Varbase system from 9.0.10 to 9.0.11, which uses Drupal core 9.5.2. That was fine, but on switching Php from 8.0 to 8.1 I get several instance of the error when viewing the status report.
Comment #14
rajab natshahFacing more issue
#3302838: Querying with NULL values results in warning mb_strtolower(): Passing null to parameter is deprecated
When local and translation is enabled.
Find out that the module Smart Trim still uses
Deprecated function:
mb_convert_encoding(): Passing null to parameter #1 ($string) of type array|string is deprecatedDeprecated function:
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\Component\Transliteration\PhpTransliteration->transliterate()Comment #16
borisson_If
getUniqueStorageIdentifieris empty - it looks like something else is seriously broken?Comment #17
rajab natshah#14
#3302838: Querying with NULL values results in warning mb_strtolower(): Passing null to parameter is deprecated
You are right, Joris
Reading again the comments
It could be happening with entity configs or configs, which had no UUID or entity data.
Then a UUID was added to the logic or config.
Or the other way, It had a UUID and that UUID was removed from default configs or config schema or from the logic.
As Lee said stack trace
Tested with PHP 8.1 ..
In PHP 8.2 many contrib modules are still hitting errors/warnings with
mb_strtolowerand other mb_str .... functionsComment #18
solideogloria commentedI saw this error on a site that already has Drupal 10.2 installed. An anonymous user visited
/core/install.php?profile=defaultI can't reproduce it, though, even though I see that's what the request was in the logs.
Comment #19
rajab natshah