diff --git a/wp-rss2.php b/wp-rss2.php index 81ca8f8ea1..a6fcaf2376 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"; + } + } } } }