Title: PHP 8 support
Last modified: September 20, 2022

---

# PHP 8 support

 *  [agtalpai](https://wordpress.org/support/users/agtalpai/)
 * (@agtalpai)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-8-support-34/)
 * Hi,
 * is there a possibility that the plugin will be updated to support PHP 8?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [flashios09](https://wordpress.org/support/users/flashios09/)
 * (@flashios09)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-support-34/#post-16093523)
 * 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), '|') . ')';
                       }
       ```
   
 *  [sydro](https://wordpress.org/support/users/sydro/)
 * (@sydro)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-support-34/#post-16129038)
 * 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: ....`
 *  [flashios09](https://wordpress.org/support/users/flashios09/)
 * (@flashios09)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-support-34/#post-16129064)
 * [@sydro](https://wordpress.org/support/users/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 3 years, 8 months ago by [flashios09](https://wordpress.org/support/users/flashios09/).
 *  [sydro](https://wordpress.org/support/users/sydro/)
 * (@sydro)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-support-34/#post-16129095)
 * Thanks for the reply. I found the bud! sorry
 *  [rapidasia](https://wordpress.org/support/users/rapidasia/)
 * (@rapidasia)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-support-34/#post-16129177)
 * [@flashios09](https://wordpress.org/support/users/flashios09/) Heroic fix, thanks
 * FYI – paste the code over what’s on lines 544 and 545
 *  [Russ](https://wordpress.org/support/users/gfxdesigner/)
 * (@gfxdesigner)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-8-support-34/#post-16276555)
 * Thanks, [@flashios09](https://wordpress.org/support/users/flashios09/) for the
   PHP8 patch!

Viewing 6 replies - 1 through 6 (of 6 total)

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

 * ![](https://ps.w.org/wp-rss-retriever/assets/icon-256x256.jpg?rev=2144668)
 * [RSS Feed Retriever](https://wordpress.org/plugins/wp-rss-retriever/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-rss-retriever/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-rss-retriever/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-rss-retriever/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-rss-retriever/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-rss-retriever/reviews/)

## Tags

 * [Updates](https://wordpress.org/support/topic-tag/updates/)

 * 7 replies
 * 5 participants
 * Last reply from: [Russ](https://wordpress.org/support/users/gfxdesigner/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/php-8-support-34/#post-16276555)
 * Status: not resolved