WordPress.org

Ready to get started?Download WordPress

Forums

BDP RSS foreach error (3 posts)

  1. 4k
    Member
    Posted 6 years ago #

    I have been using this plugin on 3 sites without issue. But now when I create a new feed page I get this error;

    Warning: Invalid argument supplied for foreach() in /home/jmscott/public_html/netroots/wp-content/plugins/bdprss/bdp-rss-output.php on line 156

    I have emailed the plugin author without success and wondered if anyone else had a suggestion as to what I need to fix.

    You can see the error here http://netroots.ca/?page_id=27

  2. 4k
    Member
    Posted 6 years ago #

    If anyone else runs into this issue this is how I solved it.

    (and may I take a moment to say; GO ME!! ;) )

    find in bdp_rss_output.php

    // map the acceptable tags
    			$tagSet = '';
    			if($keepTagSet)
    			{
    				$kts = preg_split("','", $keepTagSet, -1, PREG_SPLIT_NO_EMPTY);
    				foreach($kts as $t)
    				{
    					if(!$t) continue;
    					$u = $bdprssTagSet[$t];
    					foreach($u as $v)
    						$tagSet .= "$v,";
    				}
    			}

    and change to

    // map the acceptable tags
    			$tagSet = '';
    			if($keeptagSet)
    			{
    				$kts = preg_split("', '", $keeptagSet, -1, 
    
    PREG_SPLIT_NO_EMPTY);
    				foreach($kts as $t)
    				{
    					if(!$t) continue;
    					$u = $bdprssTagSet[$t];
    					foreach($u as $v)
    						$tagSet .= "$v,";
    				}
    			}
  3. Lynn
    Member
    Posted 5 years ago #

    Go you!

    Thank you, 4K!

Topic Closed

This topic has been closed to new replies.

About this Topic