|
|
 Andrew Rich | 2010-09-02 18:29:48 |
| This class improperly returns FALSE if the feed text, as shown in FeedValidator.org, contains the word "Sorry" if the feed successfully validated with recommendations. Instead the class should perhaps search for "This is a valid RSS feed". |
| |
2. Re: False negatives |
|
Reply |
|
|
 Andrew Rich | 2010-09-02 19:03:02 - In reply to message 1 from Andrew Rich |
Looking more closely at the code, it always fails because $this->get($feed) returns NULL.
Revised, working code in function validate:
$this->get($feed);
if ( !empty($this->buffer) && preg_match ( "/\\[Valid RSS\\]/is", $this->buffer )) {
// we got the feed, it's not empty and contains "[Valid RSS]"
return true;
} else {
// we didn't get the feed, it's empty or it doesn't contain "[Valid RSS]"
return false;
} // if
|
|