Title: Bug: Illegal String Warning Thrown then Inserted into RSS Feed
Last modified: April 11, 2019

---

# Bug: Illegal String Warning Thrown then Inserted into RSS Feed

 *  Resolved [atkoehler](https://wordpress.org/support/users/atkoehler/)
 * (@atkoehler)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/illegal-string-warning-3/)
 * The warning can be seen when viewing an imported news feed item on one of the
   regional sites that displays news from ncwsa.com. Here is the warning inserted
   into the news item:
 * `Warning: Illegal string offset 'feed' in .../plugins/contextual-related-posts/
   includes/content.php on line 179`
 * Which is imported via RSS feed, and displayed in the news item because the warning
   is inserted into the RSS.
    [http://www.ncwsa.com/category/regions/mcwsa/feed/](http://www.ncwsa.com/category/regions/mcwsa/feed/)
 * Here is line 179 in content.php
    `if ( $add_to['feed'] ) {`
 * I believe the problem is you’re trying to access $add_to and false has been returned
   by the previous crp_get_option call.
 * Please let me know if you can fix this or if it is a problem on our end. Thank
   you.
    -  This topic was modified 7 years, 1 month ago by [atkoehler](https://wordpress.org/support/users/atkoehler/).
    -  This topic was modified 7 years, 1 month ago by [atkoehler](https://wordpress.org/support/users/atkoehler/).
    -  This topic was modified 7 years, 1 month ago by [atkoehler](https://wordpress.org/support/users/atkoehler/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fillegal-string-warning-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [keengamer](https://wordpress.org/support/users/keengamer/)
 * (@keengamer)
 * [7 years ago](https://wordpress.org/support/topic/illegal-string-warning-3/#post-11440612)
 * Hello, how was this solved? I can see the same error in our PHP logs. If we go
   to our /feed page, the error just shows up. Or if anyone else or some bot goes
   there.
 * Feed in general settings are disabled, number of posts to show in Feed tab is
   0.
 * Thank you.
    -  This reply was modified 7 years ago by [keengamer](https://wordpress.org/support/users/keengamer/).
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years ago](https://wordpress.org/support/topic/illegal-string-warning-3/#post-11448326)
 * I will fix this in the next version – for that line, can you change it to the
   below and see it works?
 *     ```
       if ( isset( $add_to['feed']  ) && $add_to['feed'] ) {
       ```
   
 *  Thread Starter [atkoehler](https://wordpress.org/support/users/atkoehler/)
 * (@atkoehler)
 * [7 years ago](https://wordpress.org/support/topic/illegal-string-warning-3/#post-11448510)
 * Ajay, I will edit the plug-in file this evening and report back after an article
   is published.
 *  Thread Starter [atkoehler](https://wordpress.org/support/users/atkoehler/)
 * (@atkoehler)
 * [7 years ago](https://wordpress.org/support/topic/illegal-string-warning-3/#post-11452221)
 * Fixing that line to the code you provided appears to have fixed the bug. Thank
   you.
    -  This reply was modified 7 years ago by [atkoehler](https://wordpress.org/support/users/atkoehler/).
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [7 years ago](https://wordpress.org/support/topic/illegal-string-warning-3/#post-11452873)
 * Thanks for confirming. I’ll push this into the next version

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

The topic ‘Bug: Illegal String Warning Thrown then Inserted into RSS Feed’ is closed
to new replies.

 * ![](https://ps.w.org/contextual-related-posts/assets/icon-256x256.png?rev=2985705)
 * [Contextual Related Posts](https://wordpress.org/plugins/contextual-related-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contextual-related-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contextual-related-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/contextual-related-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contextual-related-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contextual-related-posts/reviews/)

## Tags

 * [rss-feed](https://wordpress.org/support/topic-tag/rss-feed/)

 * 5 replies
 * 3 participants
 * Last reply from: [Ajay](https://wordpress.org/support/users/ajay/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/illegal-string-warning-3/#post-11452873)
 * Status: resolved