[BUGFIX] Load file meta data properties before return 52/27652/2
authorNicole Cordes <typo3@cordes.co>
Mon, 17 Feb 2014 09:16:41 +0000 (10:16 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 17 Feb 2014 21:21:30 +0000 (22:21 +0100)
Currently it is not possible to edit files as an editor because no file
uid is submitted. This happens because meta data properties are not
loaded. This patch makes sure they get loaded before returning them.

Resolves: #56035
Releases: 6.2
Change-Id: I610aa50d785ea22cd1f0bc6265369cccf5bdd719
Reviewed-on: https://review.typo3.org/27652
Reviewed-by: Michiel Roos
Reviewed-by: Steffen Ritter
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/core/Classes/Resource/File.php

index 41ffd1b..6e4c783 100644 (file)
@@ -143,6 +143,9 @@ class File extends AbstractFile {
         * @internal
         */
        public function _getMetaData() {
+               if (!$this->metaDataLoaded) {
+                       $this->loadMetaData();
+               }
                return $this->metaDataProperties;
        }