I am getting this message trying to import from RSS feed:

warning: Invalid argument supplied for foreach() in /modules/feeds/plugins/FeedsNodeProcessor.inc on line 22.

I can't figure it out...

Comments

alex_b’s picture

I suspect that your feed is not downloading correctly. However, this is an error that should be caught more gracefully. Can you supply the feed URL that you are using?

alex_b’s picture

Title: foreach() » Invalid argument in FeedsNodeProcessor.inc on line 22
Component: User interface » Code
marynz’s picture

Hi
Im a noob,and also getting this error:

warning: Invalid argument supplied for foreach() in ...\sites\all\modules\feeds\plugins\FeedsNodeProcessor.inc on line 22.

I have tried several feed URL's all with the same result so thought perhaps ive set up Feeds wrong?

im trying different settings to see if the error will go away, will report any progress...

StratisFear’s picture

I may have some insight on this issue. Lets say I have two feeds, A and B, from two different websites.

Feed A works just fine with old FeedAPI and new Feeds.

Feed B generates the Invalid Argument with Feeds. Feed B also fails with FeedAPI, unless the box is checked...

========

Parsers

Parser Common Syndication - only for PHP5

Do not verify SSL peer
When the parser connects to an SSL protected resource it tries to validate the resource's SSL certificate. If this can't be done the feed download fails. Check this box to skip validation and accept any SSL certificate. Note that skipping validation can pose a security risk. See CURLOPT_SSL_VERIFYPEER.

========

... So maybe its a validation failure? Do we need to import this checkbox into Feeds?

alex_b’s picture

#4, right: #646750: FeedsSyndicationParser: Do not verify peer

The invalid argument error can occur for any reason that results in a failed download though. We should verify that the variable in question is indeed an array and if not, throw an exception.

problue solutions’s picture

I am also getting this error with every feed I try.

alex_b’s picture

Version: 6.x-1.0-alpha7 » 6.x-1.0-beta7
Status: Active » Closed (cannot reproduce)

I think this has been addressed in the meantime.