• Resolved Per Olsson

    (@styrketrappan)


    Hi,

    I get this message when testing to upgrade from PHP7.4 to PHP8.0

    “Warning: Trying to access array offset on value of type bool in /home/styrketr/public_html/wp-content/plugins/simple-blog-stats/simple-blog-stats.php on line 152”

    Does it have to do with this plugin?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Thanks for reporting. How can I invoke the same error? Which shortcode is causing it, or is it something on the settings page, etc.

    Thread Starter Per Olsson

    (@styrketrappan)

    Hi, I am using [sbs_posts] on a Page and default settings what I know.

    Br Per

    Plugin Author Jeff Starr

    (@specialk)

    Thanks. I will try to trigger the same warning by including [sbs_posts] on a page. If the warning happens, I will fix it. Thanks for reporting, Per.

    • This reply was modified 4 years, 1 month ago by Jeff Starr. Reason: accuracy
    Plugin Author Jeff Starr

    (@specialk)

    Hey Per, I’ve been trying to replicate the reported PHP warning, but have not been successful. I am testing on PHP 8 with [sbs_posts] on a static WP Page, but there is no warning or error. I’ve tried with both zero posts and many posts. Tried with existing options and new/default options. Cannot trigger the warning.

    So there must be something else involved here. The warning you report says:

    Trying to access array offset on value of type bool in simple-blog-stats.php on line 152

    If you examine the related code, you will find that the line in question is looking for $sbs_options, which is the plugin options array. What the warning is saying is that, essentially, the plugin options array does not exist, and thus a boolean value (i.e., false) is passed. Normally the plugin options always exist, so the warning suggests that there is something else beyond the plugin that is interfering with normal functionality.

    I would be glad to help troubleshoot further if you would like. Can also provide a free troubleshooting guide if it will be useful for you.

    Thread Starter Per Olsson

    (@styrketrappan)

    Ok, thanks for all your efforts here. I think we can startof with the troubleshooting guide so I dont waste to much of your time if it could be something else that actually interferes here.

    Plugin Author Jeff Starr

    (@specialk)

    Absolutely, here it is at DigWP.com. Let me know if any questions about the steps, etc.

    Plugin Author Jeff Starr

    (@specialk)

    Hi Per, just wanted to follow up with this. It’s been awhile with no reply, so I hope the issue is resolved? Or if there is anything I can do to help, please let me know. Thank you.

    Thread Starter Per Olsson

    (@styrketrappan)

    Hi @specialk, I think we can close this now since a couple of other plugins was updated. I dont know which plugin though sadly.

    Plugin Author Jeff Starr

    (@specialk)

    Thank you Per, appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP 8 compatibility?’ is closed to new replies.