Viewing 6 replies - 1 through 6 (of 6 total)
  • This is the patch for php8:
    edit this file:
    /path_to_wordpress/wp-content/plugins/wp-rss-retriever/inc/lib/simplepie/library/SimplePie/Parse/Date.php:544

    // This is for php version 8:
                    // the php implode function now use the <code>$separator</code> as first param and the <code>$array</code> to implode as second param
                    // see https://www.php.net/manual/en/function.implode.php#refsect1-function.implode-changelog
                    $phpVersion = substr(phpversion(), 0, 1);
                    if ($phpVersion === '8') {
                            $this->day_pcre = '(' . implode('|', array_keys($this->day)) . ')';
                            $this->month_pcre = '(' . implode('|', array_keys($this->month)) . ')'; 
                    } elseif (in_array($phpVersion, ['5', '7'])) {
                            $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
                            $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';
                    }

    This fix doesn’t work. I have this error with php8

    [Mon Oct 24 15:03:16.831279 2022] [php:error] [pid 14035] [client 172.22.0.1:44218] PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method RSS_Retriever_Feed::return_1() cannot be called statically in /var/www/html/wp-includes/class-wp-hook.php:309\nStack trace:\n#0 /var/www/html/wp-includes/plugin.php(191): WP_Hook->apply_filters()\n#1 /var/www/html/wp-includes/feed.php(817): apply_filters()\n#2 /var/www/html/wp-content/plugins/wp-rss-retriever/inc/classes/RSS_Retriever_Feed.php(50): fetch_feed()\n#3 /var/www/html/wp-content/plugins/wp-rss-retriever/inc/classes/RSS_Retriever_Feed.php(25): RSS_Retriever_Feed->retrieve_feed()\n#4 /var/www/html/wp-content/plugins/wp-rss-retriever/inc/ajax/rss-retriever-ajax-request.php(11): RSS_Retriever_Feed->__construct()\n#5 /var/www/html/wp-includes/class-wp-hook.php(307): rss_retriever_ajax_request()\n#6 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()\n#7 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action()\n#8 /var/www/html/wp-admin/admin-ajax.php(187): do_action()\n#9 {main}\n thrown in /var/www/html/wp-includes/class-wp-hook.php on line 309, referer: ....

    @sydro that’s another error, it doesn’t have anything to do with the php8 support or the implode function changes(params position)
    I remember having this error too but it was related to the rss link used in the shortcode !
    This is what i would suggest, go to your shortcode, copy the rss link, open a new tab in your browser, paste the rss link there, if you don’t get the rss xml file, means you are using a wrong link, just fix it ??

    • This reply was modified 2 years, 1 month ago by flashios09.

    Thanks for the reply. I found the bud! sorry

    @flashios09 Heroic fix, thanks

    FYI – paste the code over what’s on lines 544 and 545

    Russ

    (@gfxdesigner)

    Thanks, @flashios09 for the PHP8 patch!

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