Skip to content
Snippets Groups Projects
Commit 22a29c47 authored by ufku's avatar ufku Committed by Chris Leppanen
Browse files

Issue #2053355 by ufku, vinmassaro: Notice: Undefined variable: file FeedsParser.inc:388

parent f630564b
No related branches found
No related tags found
No related merge requests found
...@@ -340,7 +340,7 @@ class FeedsEnclosure extends FeedsElement { ...@@ -340,7 +340,7 @@ class FeedsEnclosure extends FeedsElement {
* If file object could not be created. * If file object could not be created.
*/ */
public function getFile($destination) { public function getFile($destination) {
$file = NULL;
if ($this->getValue()) { if ($this->getValue()) {
// Prepare destination directory. // Prepare destination directory.
file_prepare_directory($destination, FILE_MODIFY_PERMISSIONS | FILE_CREATE_DIRECTORY); file_prepare_directory($destination, FILE_MODIFY_PERMISSIONS | FILE_CREATE_DIRECTORY);
...@@ -385,7 +385,7 @@ class FeedsEnclosure extends FeedsElement { ...@@ -385,7 +385,7 @@ class FeedsEnclosure extends FeedsElement {
} }
// We couldn't make sense of this enclosure, throw an exception. // We couldn't make sense of this enclosure, throw an exception.
if (!isset($file)) { if (!$file) {
throw new Exception(t('Invalid enclosure %enclosure', array('%enclosure' => $this->getValue()))); throw new Exception(t('Invalid enclosure %enclosure', array('%enclosure' => $this->getValue())));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment