[BUGFIX] hasProperty ignores meta data properties
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / File.php
index 062c573..060a3b7 100644 (file)
@@ -116,6 +116,21 @@ class File extends AbstractFile {
                }
        }
 
+       /**
+        * Checks if the file has a (metadata) property which
+        * can be retrieved by "getProperty"
+        *
+        * @param string $key
+        * @return boolean
+        */
+       public function hasProperty($key) {
+               if (!parent::hasProperty($key)) {
+                       return array_key_exists($key, $this->metaDataProperties);
+               }
+               return TRUE;
+       }
+
+
        /**
         * Returns the properties of this object.
         *