Problem/Motivation
There are logs warnings after update Drupal to PHP 8.1 version
Deprecated function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in load_matchheight_selectors() (line 279 of /var/www/docroot/themes/contrib/openy_carnation/openy_carnation.theme)
#0 /var/www/docroot/core/includes/bootstrap.inc(346): _drupal_error_handler_real(8192, 'strlen(): Passi...', '/var/www/docroo...', 279)
#1 /var/www/docroot/themes/contrib/openy_carnation/openy_carnation.theme(279): _drupal_error_handler(8192, 'strlen(): Passi...', '/var/www/docroo...', 279)
#2 /var/www/docroot/themes/contrib/openy_carnation/openy_carnation.theme(261): load_matchheight_selectors()
#3 /var/www/docroot/core/lib/Drupal/Core/Theme/ThemeManager.php(287): openy_carnation_preprocess_page(Array, 'page', Array)
#4 /var/www/docroot/core/lib/Drupal/Core/Render/Renderer.php(422): Drupal\Core\Theme\ThemeManager->render('page', Array)
#5 /var/www/docroot/core/lib/Drupal/Core/Render/Renderer.php(201): Drupal\Core\Render\Renderer->doRender(Array, false)
#6 /var/www/docroot/core/lib/Drupal/Core/Template/TwigExtension.php(479): Drupal\Core\Render\Renderer->render(Array)
#7 /var/www/docroot/sites/default/files/php/twig/62835fea628f9_html.html.twig_9B2R8m_jTtgN0oe8cGgurW4gt/V0pA_pLFhu0X4-gFGNh0EASr91kZpPFKNqqdvrmJEbA.php(88): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
...
Steps to reproduce
Current Drupal Core version - 9.3.13
PHP version - 8.1
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | openy_carnation-php8.1-warning-3280846-2.patch | 541 bytes | rollins |
Issue fork openy_carnation-3280846
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:
- php.8.1-warning
changes, plain diff MR !18
- 3280846-php-8.1-strlen
changes, plain diff MR !17
Comments
Comment #2
rollins commentedHere is a patch to fix this warning.
Comment #3
rollins commentedComment #7
anpolimusThanks for your fixed.
Your PR was merged by @podarok.
Closing the issue.