• This plugin has worked fine for nearly a year but all of a sudden crashed the site with a fatal error. I have deleted and re-installed the plugin but it will not activate due to the following fatal error:
    Fatal error: Uncaught Error: Call to undefined function create_function() in /home3/oleannac/public_html/wp-content/plugins/rssfeedchecker/RSSFeedCheckerWidget.php:15 Stack trace: #0 /home3/oleannac/public_html/wp-content/plugins/rssfeedchecker/RSSFeedChecker.php(42): RSSCheckWidget::init() #1 /home3/oleannac/public_html/wp-content/plugins/rssfeedchecker/RSSFeedChecker.php(115): RSSChecker::init() #2 /home3/oleannac/public_html/wp-admin/includes/plugin.php(2288): include_once('/home3/oleannac...') #3 /home3/oleannac/public_html/wp-admin/plugins.php(192): plugin_sandbox_scrape('rssfeedchecker/...') #4 {main} thrown in /home3/oleannac/public_html/wp-content/plugins/rssfeedchecker/RSSFeedCheckerWidget.php on line 15

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pipandmick

    (@pipandmick)

    PS I forgot to add the followig info from a WordPress email that was sent when the site crashed.

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.9.2
    Current theme: Twenty Twelve (version 3.6)
    Current plugin: RSS Feed Checker (version 1.1)
    PHP version 8.0.16
    
    Error Details
    =============
    An error of type E_ERROR was caused in line 15 of the file /home3/oleannac/public_html/wp-content/plugins/rssfeedchecker/RSSFeedCheckerWidget.php. Error message: Uncaught Error: Call to undefined function create_function() in /home3/oleannac/public_html/wp-content/plugins/rssfeedchecker/RSSFeedCheckerWidget.php:15
    Stack trace:
    #0 /home3/oleannac/public_html/wp-content/plugins/rssfeedchecker/RSSFeedChecker.php(42): RSSCheckWidget::init()
    #1 /home3/oleannac/public_html/wp-content/plugins/rssfeedchecker/RSSFeedChecker.php(115): RSSChecker::init()
    #2 /home3/oleannac/public_html/wp-settings.php(418): include_once('/home3/oleannac...')
    #3 /home3/oleannac/public_html/wp-config.php(95): require_once('/home3/oleannac...')
    #4 /home3/oleannac/public_html/wp-load.php(50): require_once('/home3/oleannac...')
    #5 /home3/oleannac/public_html/wp-admin/admin.php(34): require_once('/home3/oleannac...')
    #6 /home3/oleannac/public_html/wp-admin/index.php(10): require_once('/home3/oleannac...')
    #7 {main}
      thrown
    Thread Starter pipandmick

    (@pipandmick)

    It seems this is something to do with a PHP upgrade. My hosting site automatically upgraded me from PHP 7.4 to 8.0. and this caused RSS Feed Checker to crash the site. I have subsequenty dowgraded back to 7.4 and the site and the plugin now work ok.

    Plugin Author Workshopshed

    (@workshopshed)

    The problem code seems to be the “add_action” one.

    class RSSCheckWidget extends WP_Widget {
           static function init(){
                add_action('widgets_init', create_function('', 'return register_widget("RSSCheckWidget");'));
                add_shortcode('LinksRSSEnhanced', array('RSSCheckWidget','RenderShortcode' ));
           }

    It should be possible to replace that with an anonymous function or an explicitly named one. Was a long time back so not sure why create function was used.

    An example fix is shown here.

    https://ehikioya.com/fix-for-function-create_function-is-deprecated-in-php-7-2/

    • This reply was modified 2 years, 8 months ago by Workshopshed.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘RSS Feed Checker causes fatal error’ is closed to new replies.