Skip to content
This repository
Browse code

Merge pull request #272 from gosa/patch-1

Ensure SimplePie_File errors correctly with a bad URI
  • Loading branch information...
commit e11a3075126e1872b4d0d7921693f0078e9c00d8 2 parents 7040218 + c3585a3
Ryan McCue rmccue authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  library/SimplePie/File.php
2  library/SimplePie/File.php
@@ -282,7 +282,7 @@ public function __construct($url, $timeout = 10, $redirects = 5, $headers = null
282 282 else
283 283 {
284 284 $this->method = SIMPLEPIE_FILE_SOURCE_LOCAL | SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS;
285   - if (!$this->body = file_get_contents($url))
  285 + if (empty($url) || !($this->body = file_get_contents($url)))
286 286 {
287 287 $this->error = 'file_get_contents could not read the file';
288 288 $this->success = false;

0 comments on commit e11a307

Please sign in to comment.
Something went wrong with that request. Please try again.