From 29073c00d3060e066ee08747326359c4f8e141c3 Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Sun, 16 May 2010 21:08:18 +0000
Subject: [PATCH] #783820 klonos: Fix warning: copy() [function.copy]: Filename
 cannot be empty in FeedsParser.inc on line 168.

---
 CHANGELOG.txt           | 2 ++
 plugins/FeedsParser.inc | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 39de96e8..bea58f2e 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,6 +3,8 @@
 Feeds 6.x 1.0 xxxxxxxxxxxxxxxxxxxx
 ----------------------------------
 
+- #783820 klonos: Fix warning: copy() [function.copy]: Filename cannot be empty
+  in FeedsParser.inc on line 168.
 - #778416 clemens.tolboom: Better message when plugin is missing.
 - #760140 lyricnz: FeedsBatch->total not updated when addItem($item) is called.
 - #755544 Monkey Master: Keep batch processing when mapping fails.
diff --git a/plugins/FeedsParser.inc b/plugins/FeedsParser.inc
index 17227542..70424275 100644
--- a/plugins/FeedsParser.inc
+++ b/plugins/FeedsParser.inc
@@ -162,7 +162,7 @@ class FeedsEnclosure extends FeedsElement {
    * @todo This is not concurrency safe.
    */
   public function getFile() {
-    if(!isset($this->file)) {
+    if(!isset($this->file) && $this->getValue()) {
       $dest = file_destination(file_directory_temp() .'/'. get_class($this) .'-'. basename($this->getValue()), FILE_EXISTS_RENAME);
       if (ini_get('allow_url_fopen')) {
         $this->file = copy($this->getValue(), $dest) ? $dest : 0;
-- 
GitLab