[wp-trac] [WordPress Trac] #17756: class-feed.php file_get_contents error
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 10 19:03:49 UTC 2011
#17756: class-feed.php file_get_contents error
----------------------------+-----------------------------
Reporter: kmfj1 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.2
Severity: normal | Keywords: needs-patch
----------------------------+-----------------------------
I removed my feed URL from the dashboard incoming links through the
configuration. When I go back to view Incoming Links I get a file not
found error in file_get_contents in class-feed.php on about line 88.
Warning: file_get_contents(http:) [function.file-get-contents]: failed to
open stream: Invalid argument in C:\_vhosts\xxx\xxx\wp-includes\class-
feed.php on line 88
RSS Error: file_get_contents could not read the file
file_get_contents can't open the non-existent URL (http:), which causes
the PHP error. If the script used file_exists before file_get_contents
this should fix the issue? This is not a SimplePie issue but the extended
class: WP_Feed_Cache
I changed to:
if(!file_exists($url)){
$this->error = 'the file doesn\'t exist could not read the file';
$this->success = false;
} else{
if ( ! $this->body = file_get_contents($url) ) {
$this->error = 'file_get_contents could not read the file';
$this->success = false;
}
}
This fixed the issue?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17756>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list