mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00: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: https://develop.svn.wordpress.org/trunk@22330 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user