FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 FeedForAll_rss2html_pro.php seems to ignore $hideErrors = 1; View next topic
View previous topic
Post new topicReply to topic
Author Message
SunnyMobi



Joined: 17 Jan 2008
Posts: 7

PostPosted: Thu Feb 17, 2011 11:47 am Reply with quoteBack to top

Hiya,

I set the following Tag in rss2html.php:

// $hideErrors: This will prevent all error messages from being displayed.
// CAUTION enabling this will cause rss2html.php to fail silently with
// no indication to why there was no output
$hideErrors = 1;

Still I see:

Parse error: syntax error, unexpected T_STRING in /var/www/FeedForAll_rss2html_pro(155) : eval()'d code on line 122 (sometimes it is also line 36 or 76...).

The error is apparently caused by strange content in the RSS feed source - I can stop the error from occurring, by simply using a different feed, but that is of course no solution :)

As long as the feed is faulty I simply want to show the cached content until the feed becomes clean again. No problem w. the normal, free rss2html, but apparently the Pro versions shows the errors?

What am I doing wrong? (How) can this be fixed/circumvented?

Cheers!
View user's profile
SunnyMobi



Joined: 17 Jan 2008
Posts: 7

PostPosted: Thu Feb 17, 2011 11:58 am Reply with quoteBack to top

P.S.: here the code I use in my template - could this cause the errors?

It shall split the Author from the actual Headline; the two are in ItemTitle and separated by "blank dash blank"-sequence:

Code:
~~~FeedMaxItems=3~~~
  ~~~BeginItemsRecord~~~
<div>
  <div class="indent">
    <div class="title">
      <h2><a href="/news.php" >
        <? $myString = '~~~ItemTitle~~~';
$findMe   = ' - ';
$pos = strpos($myString, $findMe);
echo substr('~~~ItemTitle~~~', 0, $pos); ?>
        </a></h2>
      <div class="date">~~~ItemPubLongDate~~~</div>
      <div class="author"> <strong>Author</strong>
        <? $myString = '~~~ItemTitle~~~';
$findMe   = ' - ';
$pos = strpos($myString, $findMe);
echo substr('~~~ItemTitle~~~', $pos); ?>
      </div>
    </div>
    <div class="text-box">
      <p>~~~ItemDescription~~~</p>
    </div>
  </div>
</div>
~~~EndItemsRecord~~~
View user's profile
SunnyMobi



Joined: 17 Jan 2008
Posts: 7

PostPosted: Fri Feb 18, 2011 11:10 am Reply with quoteBack to top

obviously PRO didn't like my humble PHP code.

Using the following works w. no errors:

Code:
<?
$data = "~~~ItemTitle~~~";
list($headline, $author) = explode(" - ", $data);
echo $headline;
echo $author;
?>


Still $hideErrors = 1; does not seem to work w. PRO :-)
View user's profile
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme