[BUGFIX] Check existence of OEmbed title 78/59878/2
authorSusanne Moog <susanne.moog@typo3.com>
Wed, 6 Mar 2019 10:25:43 +0000 (11:25 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 7 Mar 2019 18:10:27 +0000 (19:10 +0100)
Under certain circumstances the title property
of the OEmbed info might be empty, so the check
has been expanded to contain the used property.

Resolves: #87529
Releases: master, 9.5
Change-Id: I1e56f0d91cb6c6f86a5b16f375525b5da30d3f9f
Reviewed-on: https://review.typo3.org/c/59878
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Resource/OnlineMedia/Helpers/AbstractOEmbedHelper.php

index 897a02f..16ade5b 100644 (file)
@@ -46,7 +46,7 @@ abstract class AbstractOEmbedHelper extends AbstractOnlineMediaHelper
         // no existing file create new
         if ($file === null) {
             $oEmbed = $this->getOEmbedData($mediaId);
-            if (!empty($oEmbed)) {
+            if (!empty($oEmbed['title'])) {
                 $fileName = $oEmbed['title'] . '.' . $fileExtension;
             } else {
                 $fileName = $mediaId . '.' . $fileExtension;