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.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.