I am combining two feeds, with enclosures, and items that don't have enclosures are showing up with empty enclosures.
Here's the code with the offending bit in bold:
<item>
<title><?echo $item->get_title(); ?></title>
<guid><? echo $item->get_permalink(); ?></guid>
<link><? echo $item->get_permalink(); ?></link>
**<? if ($enclosure = $item->get_enclosure()) {echo "<enclosure url='"
.$enclosure->get_link() ."' length='" .$enclosure->get_length() ."' type='"
.$enclosure->get_type() ."' />";} ?>**
<description>
<? echo $item->get_title(); ?>
</description>
</item>
Items with no enclosures show up with an empty enclosure url, length, and type:
All real enclosures show up as they should with url, length and type. I read a few threads on the Simplepie support page, but came up with no solution.
Thanks!