• Resolved atkoehler

    (@atkoehler)


    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.
    https://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 5 years, 11 months ago by atkoehler.
    • This topic was modified 5 years, 11 months ago by atkoehler.
    • This topic was modified 5 years, 11 months ago by atkoehler.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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 5 years, 11 months ago by keengamer.
    Plugin Author Ajay

    (@ajay)

    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

    (@atkoehler)

    Ajay, I will edit the plug-in file this evening and report back after an article is published.

    Thread Starter atkoehler

    (@atkoehler)

    Fixing that line to the code you provided appears to have fixed the bug. Thank you.

    • This reply was modified 5 years, 11 months ago by atkoehler.
    Plugin Author Ajay

    (@ajay)

    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.