Permalink
Browse files

Merge pull request #272 from gosa/patch-1

Ensure SimplePie_File errors correctly with a bad URI
  • Loading branch information...
2 parents 7040218 + c3585a3 commit e11a3075126e1872b4d0d7921693f0078e9c00d8 @rmccue rmccue committed Mar 14, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 library/SimplePie/File.php
@@ -282,7 +282,7 @@ public function __construct($url, $timeout = 10, $redirects = 5, $headers = null
else
{
$this->method = SIMPLEPIE_FILE_SOURCE_LOCAL | SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS;
- if (!$this->body = file_get_contents($url))
+ if (empty($url) || !($this->body = file_get_contents($url)))
{
$this->error = 'file_get_contents could not read the file';
$this->success = false;

0 comments on commit e11a307

Please sign in to comment.