Fix editing newly uploaded media files
authorMatthias Schmidt <gravatronics@live.com>
Thu, 24 Dec 2015 09:02:48 +0000 (10:02 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 24 Dec 2015 09:02:48 +0000 (10:02 +0100)
wcfsetup/install/files/lib/acp/form/MediaEditForm.class.php

index d8a19dc87c90a3954daab721a936e8e3c87be8e6..f610fc5027a8678e65e22d7cbb470ba574b1c810 100644 (file)
@@ -94,9 +94,9 @@ class MediaEditForm extends AbstractForm {
                        
                        $contentData = $this->media->getI18nData();
                        if (!empty($contentData)) {
-                               I18nHandler::getInstance()->setValues('altText', $contentData['altText']);
-                               I18nHandler::getInstance()->setValues('caption', $contentData['caption']);
-                               I18nHandler::getInstance()->setValues('title', $contentData['title']);
+                               if (!empty($contentData['altText'])) I18nHandler::getInstance()->setValues('altText', $contentData['altText']);
+                               if (!empty($contentData['caption'])) I18nHandler::getInstance()->setValues('caption', $contentData['caption']);
+                               if (!empty($contentData['title'])) I18nHandler::getInstance()->setValues('title', $contentData['title']);
                        }
                }