Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update File.php

There is PHP error "Filename cannot be empty" when someone tries to instantiate SimplePie_File object with bad URI (e.g. URI without schema "www.vg.no/rss/create.php?categories=21,20&keywords=&limit=10")
  • Loading branch information...
commit c3585a3a514af4a4214b641b64156af455b2ec41 1 parent 7040218
@gosa gosa authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  library/SimplePie/File.php
View
2  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;
Please sign in to comment.
Something went wrong with that request. Please try again.