From 739d40ded54ee78fb95cbf7745705595205bcc58 Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Sun, 25 Jul 2010 14:02:55 +0000
Subject: [PATCH] Clarify that file path is TEMPORARY. Use empty() to check for
 presence of filepath, not isset().

---
 plugins/FeedsParser.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/plugins/FeedsParser.inc b/plugins/FeedsParser.inc
index c5fc8c0c..fcf75f57 100644
--- a/plugins/FeedsParser.inc
+++ b/plugins/FeedsParser.inc
@@ -155,14 +155,15 @@ class FeedsEnclosure extends FeedsElement {
 
   /**
    * @return
-   *   The file path to the downloaded resource referenced by the enclosure.
-   *   Downloads resource if not downloaded yet.
+   *   A temporary file path to the downloaded resource referenced by the
+   *   enclosure. Downloads resource if not downloaded yet. The file path is
+   *   valid for the time of the page load.
    *
    * @todo Get file extension from mime_type.
    * @todo This is not concurrency safe.
    */
   public function getFile() {
-    if(!isset($this->file) && $this->getValue()) {
+    if(empty($this->file) && $this->getValue()) {
       $filename = basename($this->getValue());
       if (module_exists('transliteration')) {
         require_once (drupal_get_path('module', 'transliteration') . '/transliteration.inc');
-- 
GitLab