From 3dde29bde079f9b56a8373afeb957d48e46603bc Mon Sep 17 00:00:00 2001 From: emc3 Date: Wed, 20 Oct 2004 16:54:31 +0000 Subject: [PATCH] BUG 390: Fixed support for multiple enclosures. git-svn-id: http://svn.automattic.com/wordpress/trunk@1821 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-rss2.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-rss2.php b/wp-rss2.php index 81ca8f8ea..a6fcaf237 100644 --- a/wp-rss2.php +++ b/wp-rss2.php @@ -46,9 +46,12 @@ $custom_fields = get_post_custom(); if( is_array( $custom_fields ) ) { while( list( $key, $val ) = each( $custom_fields ) ) { if( $key == 'enclosure' ) { - $enclosure = $val[ 0 ]; - $enclosure = split( "\n", $enclosure ); - print "\n"; + if (is_array($val)) { + foreach($val as $enc) { + $enclosure = split( "\n", $enc ); + print "\n"; + } + } } } }