PressForward / pressforward

PressForward is a free plugin that provides an editorial workflow for content aggregation and curation within the WordPress dashboard. It is designed for bloggers and editorial teams who wish to collect, discuss, and share content from a variety of sources on the open web.
GNU Affero General Public License v3.0
119 stars 22 forks source link

Fatal error in /modules/rss-import/rss-import.php:152 #1022

Closed r-a-y closed 5 years ago

r-a-y commented 6 years ago

Saw this in a server's error logs.

PHP Fatal error: Uncaught InvalidArgumentException: Passed variable is not an array or object in /wp-content/plugins/pressforward/modules/rss-import/rss-import.php:152

[Fri Oct 19 13:57:52 2018] [error] [pid 56742] sapi_apache2.c(351): PHP Fatal error:  Uncaught InvalidArgumentException: Passed variable is not an array or object in /wp-content/plugins/pressforward/modules/rss-import/rss-import.php:152
Stack trace:
#0 /wp-content/plugins/pressforward/modules/rss-import/rss-import.php(152): ArrayIterator->__construct(NULL)
#1 /wp-content/plugins/pressforward/Core/Utility/Retrieval.php(386): PF_RSS_Import->get_data_object(Object(WP_Post))
#2 /wp-content/plugins/pressforward/Core/Utility/Retrieval.php(509): PressForward\\Core\\Utility\\Retrieval->get_the_feed_object('rss-import', Object(WP_Post))
#3 /wp-content/plugins/pressforward/Core/Utility/Retrieval.php(271): PressForward\\Core\\Utility\\Retrieval->feed_handler(Object(WP_Post))
#4 /wp-content/plugins/pressforward/Core/Schema/Feed_Items.php(518): PressForward\\Core\\Utility\\Retrieval->step_through_feedlist()
#5 /wp-content/plugins/pressforward/ in /wp-content/plugins/pressforward/modules/rss-import/rss-import.php on line 152

Hope that is enough to go on.

Let me know if you need anything from my end.

AramZS commented 6 years ago

Looking into this.

lmrhody commented 5 years ago

Hi, Aram! Thanks for looking into this.

AramZS commented 5 years ago

Patch was to fix error introduced in commit https://github.com/PressForward/pressforward/commit/14b62b8cab3f96b9d2da67508b4f47ed662580f8

This should be tested to assure it doesn't effect the result rendered by solving #985

AramZS commented 5 years ago

@r-a-y & @lmrhody it would be helpful if you could potentially test the current state of 5.2.x to see if this revolves the error? Do you have a list of feeds that are in your site that I can examine to try and duplicate the error on my own? I think the problem is a lack of GUID values, but it is real weird, I would have thought such an issue would have prevented the feed from parsing.

r-a-y commented 5 years ago

We've received reports from our users that the fix appears to be working.

Thanks @AramZS ! Feel free to close this one out.

AramZS commented 5 years ago

@r-a-y Awesome, I will close when we release!

lmrhody commented 5 years ago

Sorry for the delay here, but yes, it seems that this has been fixed. Thanks so much.

PauloBoaventura commented 5 years ago

Sorry but it looks like the error has returned ...

2019/06/15 21:39:05 [error] 8111#8111: *361 upstream sent too big header while reading response header from upstream, client: 172.69.70.201, server: [MYSERVER], request: "GET /?press=forward&nonce=8068537bb30658a7f988200a451b3522 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "[MYHOST]", referrer: "[MY SITE]?press=forward&nonce=8068537bb30658a7f988200a451b3522"

2019/06/15 21:39:05 [error] 8111#8111: *2925 FastCGI sent in stderr: "on.club/public_html/wp-content/plugins/pressforward/modules/rss-import/rss-import.php on line 158PHP message: PHP Notice: Undefined index: isPermaLink in /home/[MY SITE]/public_html/wp-content/plugins/pressforward/modules/rss-import/rss-import.php on line 158PHP message: PHP Notice: Undefined index: isPermaLink in /home/[MY SITE]/public_html/wp-content/plugins/pressforward/modules/rss-import/rss-import.php on line 158PHP message: PHP Notice: Undefined index: isPermaLink in /home/[MY SITE]/public_html/wp-content/plugins/pressforward/modules/rss-import/rss-import.php on line 158PHP message: PHP Notice: Undefined index: isPermaLink in /home/[MY SITE]/public_html/wp-content/plugins/pressforward/modules/rss-import/rss-import.php on line 158PHP message: PHP Notice: Undefined index: isPermaLink in /home/[MY SITE]/public_html/wp-content/plugins/pressforward/modules/rss-import/rss-import.php on line 158PHP message: PHP Notice: Undefined index: isPermaLink in /home/[MY SITE]/public_html/wp-content/plugins/pressforward/modules/rss-import/rss-import.php on line 158" while reading response header from upstream, client: 172.69.70.207, server: [MY SERVER], request: "GET /?press=forward&nonce=639e228cd5fab359895339f4126b52aa HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "[MY HOST]", referrer: "https://[MY SITE]/?press=forward&nonce=639e228cd5fab359895339f4126b52aa"