mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-08 17:38:26 +01:00
When reading local feeds from disk, check that the file exists first to avoid a PHP Warning in WP_SimplePie_File. Props SergeyBiryukov. Fixes #17756
git-svn-id: http://core.svn.wordpress.org/trunk@22330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1e72313ec2
commit
3417e0245a
@ -89,7 +89,7 @@ class WP_SimplePie_File extends SimplePie_File {
|
||||
$this->status_code = wp_remote_retrieve_response_code( $res );
|
||||
}
|
||||
} else {
|
||||
if ( ! $this->body = file_get_contents($url) ) {
|
||||
if ( ! file_exists($url) || ( ! $this->body = file_get_contents($url) ) ) {
|
||||
$this->error = 'file_get_contents could not read the file';
|
||||
$this->success = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user