• Resolved nickisnow

    (@nickisnow)


    I am using the Category Posts Widget plugin v4.9.15 with WordPress v6.3.1. The widget works great! However, when I upgraded to PHP v8.1, my error log is filled with warnings.

    [18-Sep-2023 15:38:42 UTC] PHP Warning:  Undefined array key "category-posts-4" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [18-Sep-2023 15:38:44 UTC] PHP Warning:  Undefined array key "category-posts-4" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [18-Sep-2023 17:23:15 UTC] PHP Warning:  Undefined array key "category-posts-4" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [18-Sep-2023 17:35:35 UTC] PHP Warning:  Undefined array key "category-posts-4" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [18-Sep-2023 17:37:47 UTC] PHP Warning:  Undefined array key "category-posts-5" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [18-Sep-2023 19:20:41 UTC] PHP Warning:  Undefined array key "category-posts-5" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [18-Sep-2023 19:44:15 UTC] PHP Warning:  Undefined array key "category-posts-5" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158

    Will your plugin be updated to work with PHP 8.1?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Daniel Floeter

    (@kometschuh)

    I have seen it yesterday and will fix it asap.

    It’s just in the loggs or with debug > true and I hope you can wait for some short hours?

    Plugin Author Daniel Floeter

    (@kometschuh)

    @nickisnow We debug with the PHP 8.2, WP 6.3.1 and don’t get that error.

    I guess you use the Category Posts Widget in a widget area?

    Do you use the Classic Widget?

    Which Theme do you use?

    Thread Starter nickisnow

    (@nickisnow)

    Thanks for the quick reply. I only see the PHP warning in the logs. I am using the Beaver Builder child theme. I am using the Category Posts widget in the sidebar widget area on two pages:
    https://homosassaredfish.com/fishing-reports/
    https://homosassaredfish.com/captain-red-ed-brennans-favorite-fish-seafood-recipes/
    I am using the Beaver Builder child theme.

    Plugin Author Daniel Floeter

    (@kometschuh)

    It’s possible to change the Theme to a WordPress Theme, like: twenty twenty three, twenty twenty-one or twenty twenty-two and check if you get the errors anyway?

    Thread Starter nickisnow

    (@nickisnow)

    Ok, I switched to the Twenty Twenty Three theme and I still see the warnings. They show up when I click on a link to a post from the widget.

    [19-Sep-2023 18:09:39 UTC] PHP Warning:  Undefined array key "category-posts-5" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [19-Sep-2023 18:10:47 UTC] PHP Warning:  Undefined array key "category-posts-4" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [19-Sep-2023 18:10:59 UTC] PHP Warning:  Undefined array key "category-posts-4" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    [19-Sep-2023 18:11:07 UTC] PHP Warning:  Undefined array key "category-posts-5" in /mywebsite/wp-content/plugins/category-posts/class-virtual-widget.php on line 158
    • This reply was modified 1 year, 6 months ago by nickisnow.
    Thread Starter nickisnow

    (@nickisnow)

    I figured out the issue. I was also using the Easy Custom Sidebars plugin. If I deactivate that plugin, the warnings go away. Sorry to waste your time. And, thank you for the amazing customer support!

    • This reply was modified 1 year, 6 months ago by nickisnow.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Warnings with upgrade to PHP 8.1’ is closed to new replies.