Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295751

Querying with NULL values results in warning mb_strtolower(): Passing null to parameter is deprecated

$
0
0

Problem/Motivation

This issue was originally brought into focus when PHP 8.1 was introduced.

Error message when enabling modules:

Deprecated function: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Core\Config\Entity\Query\Condition->compile() (line 39 of core/lib/Drupal/Core/Config/Entity/Query/Condition.php).
Drupal\Core\Config\Entity\Query\Condition->compile(Array) (Line: 85)
Drupal\Core\Config\Entity\Query\Query->execute() (Line: 301)
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 124)
Drupal\language\Entity\ConfigurableLanguage->preSave(Object) (Line: 562)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 517)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 253)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 607)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 392)
Drupal\Core\Config\ConfigInstaller->createConfiguration('', Array) (Line: 99)
Drupal\features\FeaturesConfigInstaller->createConfiguration('', Array) (Line: 152)
Drupal\Core\Config\ConfigInstaller->installDefaultConfig('module', 'ldp_translation') (Line: 327)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 175)
Drupal\system\Form\ModulesListConfirmForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
... snipped

Steps to reproduce

Using a supported version of PHP such as 8.1/8.2/8.3/8.4

Enable some custom or contrib module that has configs to install and the config somehow results in a null uuid. After the module is enabled, the error message will be displayed.

RELATED ISSUES LINKED:

Release notes snippet

Make core more resilient to null uuids when using recent versions of PHP
We have a proven tests only failure.
The solution passes the new test.


Viewing all articles
Browse latest Browse all 295751


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>