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

Command icon 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

rollins created an issue. See original summary.

rollins’s picture

Here is a patch to fix this warning.

rollins’s picture

Status: Active » Needs review

anpolimus’s picture

Status: Needs review » Fixed

Thanks for your fixed.
Your PR was merged by @podarok.
Closing the issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.