PHP fatal error from style.php

Hi,

I am using PHP 8.1. When I try to use the theme, this fatal error appears in debug.log:

 [30-Jan-2024 06:53:48 UTC] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /home/citypattib/www/wp-content/themes/betheme/style.php:156
Stack trace:
#0 /home/website/www/wp-content/themes/betheme/functions/theme-head.php(1112): include_once()
#1 /home/website/www/wp-content/themes/betheme/functions/theme-head.php(652): mfn_styles_dynamic()
#2 /home/website/www/wp-includes/class-wp-hook.php(324): mfn_styles_inline('')
#3 /home/website/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /home/website/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /home/website/www/wp-includes/script-loader.php(2262): do_action('wp_enqueue_scri...')
#6 /home/website/www/wp-includes/class-wp-hook.php(324): wp_enqueue_scripts('')
#7 /home/website/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#8 /home/website/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 /home/website/www/wp-includes/general-template.php(3052): do_action('wp_head')
#10 /home/website/www/wp-content/themes/betheme/404.php(23): wp_head()
#11 /home/website/www/wp-includes/template-loader.php(106): include('/home/website...')
#12 /home/website/www/wp-blog-header.php(19): require_once('/home/website...')
#13 /home/website/www/index.php(17): require('/home/website...')
#14 {main}
  thrown in /home/website/www/wp-content/themes/betheme/style.php on line 156

When I am using another theme, it works fine.

Thanks for your help!

Comments

  • Hi,

    Please go to Betheme -> Theme options -> Fonts -> Size & Style, and check if you do not have any weird values inserted there.

    You should only have numbers without additional characters like "16px". It should be "16" only.


    Best regards

Sign In or Register to comment.