WordPress.org

Make WordPress Core

Changeset 22330


Ignore:
Timestamp:
10/30/2012 08:48:35 PM (6 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-feed.php

    r21652 r22330  
    9090            }
    9191        } else {
    92             if ( ! $this->body = file_get_contents($url) ) {
     92            if ( ! file_exists($url) || ( ! $this->body = file_get_contents($url) ) ) {
    9393                $this->error = 'file_get_contents could not read the file';
    9494                $this->success = false;
Note: See TracChangeset for help on using the changeset viewer.