Browse Source

fixed rss media notification
https://www.drupal.org/node/2472409

Bachir Soussi Chiadmi 4 years ago
parent
commit
a99f2d7aa6

+ 1 - 1
sites/all/modules/contrib/rss/views_rss_media/views_rss_media.field.inc

@@ -180,7 +180,7 @@ function views_rss_media_field_formatter_view($entity_type, $entity, $field, $in
 
     // When generating a thumbnail for a video file,
     // let's process only thumbnail image details.
-    if ($item['type'] == 'video' && $display['type'] == 'media_thumbnail') {
+    if ($display['type'] == 'media_thumbnail' && $item['type'] == 'video') {
       $item = (array) $item['thumbnailfile'];
     }
 

+ 26 - 0
views_rss_media-2472409-1.patch

@@ -0,0 +1,26 @@
+From 343f3a90f3904e74732d0005ff037d5b51d2b416 Mon Sep 17 00:00:00 2001
+From: Dane Powell <git@danepowell.com>
+Date: Thu, 16 Apr 2015 08:44:46 -0500
+Subject: [PATCH] Issue #2472409 by Dane Powell: Fixed undefined index in
+ views_rss_media_field_formatter_view().
+
+---
+ views_rss_media.field.inc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/views_rss_media.field.inc b/views_rss_media.field.inc
+index 32ef206..4eca063 100644
+--- a/views_rss_media.field.inc
++++ b/views_rss_media.field.inc
+@@ -180,7 +180,7 @@ function views_rss_media_field_formatter_view($entity_type, $entity, $field, $in
+ 
+     // When generating a thumbnail for a video file,
+     // let's process only thumbnail image details.
+-    if ($item['type'] == 'video' && $display['type'] == 'media_thumbnail') {
++    if ($display['type'] == 'media_thumbnail' && $item['type'] == 'video') {
+       $item = (array) $item['thumbnailfile'];
+     }
+ 
+-- 
+2.1.0
+