Title: Not PHP 8 compatible
Last modified: February 27, 2023

---

# Not PHP 8 compatible

 *  Resolved [nielsvanrenselaar](https://wordpress.org/support/users/nielsvanrenselaar/)
 * (@nielsvanrenselaar)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/not-php-8-compatible/)
 * PHP 8.0 and above
 * **Fatal error**: Uncaught Error: Call to undefined function create_function()
   in /wp-content/plugins/royal-recent-posts-widget-by-category/royal-recent-posts-
   widget-by-category.php:253 Stack trace: #0 /wp-admin/includes/plugin.php(2314):
   include_once() #1 /wp-admin/plugins.php(192): plugin_sandbox_scrape(‘royal-recent-
   po…’) #2 {main} thrown in **/wp-content/plugins/royal-recent-posts-widget-by-
   category/royal-recent-posts-widget-by-category.php** on line **253**
 * If you fix this by changed the widget_init:
 *     ```wp-block-code
       function register_royal_recent_posts_widget_by_category() {
       	return register_widget("RRPWbC");
       }
       add_action( 'widgets_init', 'register_royal_recent_posts_widget_by_category');
       ```
   
 * Then the next error is:
 * **Fatal error**: Uncaught ArgumentCountError: Too few arguments to function WP_Widget::
   __construct(), 0 passed
 * Additional sidenote: all the $instance variables are not checked if the exists,
   when you didn’t setup the widget before a lot of notices/warnings will popup 
   with debug mode on.
    -  This topic was modified 3 years, 3 months ago by [nielsvanrenselaar](https://wordpress.org/support/users/nielsvanrenselaar/).
    -  This topic was modified 3 years, 3 months ago by [nielsvanrenselaar](https://wordpress.org/support/users/nielsvanrenselaar/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [kgmservizi](https://wordpress.org/support/users/kgmservizi/)
 * (@kgmservizi)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/not-php-8-compatible/#post-16529442)
 * Hi [@nielsvanrenselaar](https://wordpress.org/support/users/nielsvanrenselaar/)
 * Wrong plugin.
 * Regards

Viewing 1 replies (of 1 total)

The topic ‘Not PHP 8 compatible’ is closed to new replies.

 * ![](https://ps.w.org/widget-recent-posts-with-category-choice/assets/icon-256x256.
   png?rev=2411461)
 * [Recent Posts Widget Advanced](https://wordpress.org/plugins/widget-recent-posts-with-category-choice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/widget-recent-posts-with-category-choice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/widget-recent-posts-with-category-choice/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-recent-posts-with-category-choice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-recent-posts-with-category-choice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-recent-posts-with-category-choice/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [kgmservizi](https://wordpress.org/support/users/kgmservizi/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/not-php-8-compatible/#post-16529442)
 * Status: resolved