Many PHP errors "Illegal string offset" and "Trying to access array offset on value of type null"

I installed a fresh copy of the theme after deleting the old betheme folder in my installation. Now my PHP Error Log is filling with these warnings. The site appears to work OK otherwise. There is also a "Trying to access array offset on value of type null" Notice

Some info based on what I read on other support tickets with this warning:

  • "Can you tell me what version of WP and PHP do you have, please?"
    • PHP Version 7.4.27
  • WP 5.8.2
  • BethemeVersion: 25.1.7
  • "Please, try to download a Betheme package and upload it again, and check if the problem persists."
    • I tried a fresh download and uploaded again, no help.

Line 112 of style.php for example is:

$aFont['menu']['line_height'] = 0;

I can provide FTP credentials if needed.

from the log: (there are many more line numbers than this but I can't fit them all in this post)

[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'line_height' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 112
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'size' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 120
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'line_height' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 121
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'weight_style' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 122
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'letter_spacing' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 123
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'weight_style' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 125
[31-Dec-2021 04:56:07 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 132
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'size' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 144
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'weight_style' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 145
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'size' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 195
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'line_height' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 196
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'weight_style' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 197
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'letter_spacing' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 198
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'weight_style' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 200
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'size' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 207
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'line_height' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 208
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'weight_style' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 209
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'letter_spacing' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on line 210
[31-Dec-2021 04:56:07 UTC] PHP Warning:  Illegal string offset 'weight_style' in /home/customer/www/[redacted].com/public_html/wp-content/themes/betheme/style.php on li


Comments

  • Hello,

    Please, go to Betheme -> Theme options -> Fonts -> Size & Style, delete all the settings from there, and add them again.

    Remember to put only numeric values without 'px' at the end. When you do this, save changes, and check if these warnings still appear.


    Thanks

Sign In or Register to comment.