- 🇺🇸United States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request → as a guide.
This could use steps to reproduce, to be added to the issue summary.
Though how I see Drupal usually handles these is to figure out what is causing the issue vs treating a symptom.
As a bug it will need a test case.
- 🇮🇳India selvakumar-96
Deprecated function: mb_strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\system\Plugin\Condition\RequestPath->evaluate() (line 144 of core/modules/system/src/Plugin/Condition/RequestPath.php).
For the above issue check the patch added.
- heddn Nicaragua
I think we should add some logging and not make this too silent. Per #11. But previous to PHP 8.1, this would have silently been eaten, so doing a silent treatment also isn't the worst thing in the world.
- last update
almost 2 years ago Custom Commands Failed - last update
almost 2 years ago Custom Commands Failed - last update
almost 2 years ago Custom Commands Failed - 🇯🇴Jordan mohammad-fayoumi Amman
updating the patches and adopting a solution that assigns a default value to the string parameter before invoking mb_strtolower(). This approach ensures compatibility with PHP 8.1 and prevents passing null as the string parameter, which triggers the deprecation warning.
- Status changed to Needs review
over 1 year ago 9:53am 17 July 2023 - last update
over 1 year ago 30,341 pass - Status changed to Needs work
over 1 year ago 2:08pm 17 July 2023 - 🇺🇸United States smustgrave
Was previously tagged for steps to reproduce and tests which still needs to happen.
Did not review or test.
- last update
over 1 year ago 29,454 pass - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 30,341 pass - last update
over 1 year ago 29,465 pass - last update
over 1 year ago 29,465 pass - 🇮🇳India abhisekmazumdar India
I was trying to do a fresh install for one of the Drupal projects I'm working on, which is on version 10.1.2. I encountered a similar error, but the error originated from a different file.
- 🇦🇺Australia elc
The need to guard against value key being empty in core/lib/Drupal/Core/Config/Entity/Query/Condition.php is negated for me by patching with the one line change in 🐛 Querying with NULL values results in warning mb_strtolower(): Passing null to parameter is deprecated Needs work . It means that the value passed into the function is not empty instead of the receiving function needing to guard against it.
I have not run into the others as yet.
- 🇪🇸Spain rcodina Barcelona
The patch on the MR (https://git.drupalcode.org/project/drupal/-/merge_requests/3199.patch) fixed the problem for me.
On the other hand, notice that not all file patches attached on this issue solve the error described in issue description. So we need to either focus on the MR or in the patch. The patch should include the original getId method fix and include all other reported mb_strtolower issues under PHP 8.1.
- last update
over 1 year ago 30,493 pass - Status changed to RTBC
over 1 year ago 12:43pm 21 November 2023 - 🇩🇪Germany sanduhrs 🇪🇺 Heidelberg, Germany, Europe
MR !3199 works and looks reasonable to me.
- last update
over 1 year ago 30,341 pass - last update
over 1 year ago 30,341 pass - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - Status changed to Needs work
over 1 year ago 7:17am 24 December 2023 - 🇳🇿New Zealand quietone
I'm triaging RTBC issues → . I read the IS and skimmed through the comments.
The work asked for in #11, which is supported by heddn in #14, and asked for again in #19 has not been completed. It is vital that it is know how this can happen on Drupal core, otherwise the root cause will not be fixed by the current change. I am setting this to Needs work.
- 🇧🇪Belgium ikeigenwijs
We also have this deprecated alert, but we dont use paragraphs on the site.
D10 on php 8.2
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)
- 🇺🇸United States j_s
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)
The patch provided with the MR in 3301613 📌 Only process values in config entity query conditions for values that have values Active fixed this error for me.
- last update
over 1 year ago 25,991 pass, 1,823 fail - Status changed to Needs review
about 1 year ago 1:35pm 17 January 2024 - Status changed to Needs work
about 1 year ago 2:04pm 17 January 2024 - 🇺🇸United States smustgrave
Not sure what's wrong with the patch but appears to be adding files that already exist.
If going to try a new solution should be documented in the issue summary or in the comment about new approach and why it's better.
Was previously tagged for steps to reproduce + tests which are still needed.
Also patches are being phased out.
Thanks.
- last update
about 1 year ago Patch Failed to Apply - 🇩🇪Germany geek-merlin Freiburg, Germany
I ran into this too and debugged it.
- YES (at least from my case) it looks like this should NOT be silenced, because it would hide an underlying issue.
- NO, it is not wontfix, any such warning means that a warning should be emitted somewhere else already, which is a bug.How to debug
(might go into a docs page "How to debug backtraces in theming")
- Note the full backtrace and publish it
- It contains sth like this:Drupal\Component\Utility\Html::getUniqueId(NULL) (Line: 42) __TwigTemplate_0818f4f8612ad478e98a373e283b0d1d->doDisplay(Array, Array) (Line: 360)
which means that the template with the long name called the function above in template line 42 (!)
- Note the full template and publish it. (without this, the trace is likely useless.)
- Look on line 42 what is missing.Example
In my case the template had top line
/* core/modules/navigation/templates/navigation-menu.html.twig */
and line 42 is$context["menu_heading_id"] = ("menu--" . \Drupal\Component\Utility\Html::getUniqueId($this->sandbox->ensureToStringAllowed(($context["menu_name"] ?? null), 2, $this->source)));
Also i see this in the backtrace:
twig_render_template('core/modules/navigation/templates/navigation-menu.html.twig', Array) (Line: 348)
Which spots me to this line of custom code:
$build = [ '#theme' => 'navigation_menu', '#items' => self::getLinkItems($linkTreeList, $cacheabilityCollector), '#sorted' => TRUE, ];
and the following change fixes my instance of the issue
$build = [ '#theme' => 'navigation_menu', '#items' => self::getLinkItems($linkTreeList, $cacheabilityCollector), '#sorted' => TRUE, '#menu_name' => 'dummy', ];
The underlying bug is that the template does not emit a missing-value warning, and no default is set.
Hope this helps.