WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #17756


Ignore:
Timestamp:
06/11/11 03:31:17 (3 years ago)
Author:
dd32
Comment:

The reason this is fitting a file_get_contents() call is because it assumes it's a local file. This is because it doesn't recognise that as a URL, as it doesn't match the pattern http(s)?:

Seems worthwhile changing that to something like the following, I'm not sure if we need another string for it, not that these strings are translated anyway

if ( ! file_exists($url) || ( ! $this->body = file_get_contents($url) ) ) {
	$this->error = 'file_get_contents could not read the file';
	$this->success = false;
}

Legend:

Unmodified
Added
Removed
Modified