Title: Error getting the duration with powerpress_get_enclosure_data() function
Last modified: November 11, 2022

---

# Error getting the duration with powerpress_get_enclosure_data() function

 *  [frontpor](https://wordpress.org/support/users/frontpor/)
 * (@frontpor)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-getting-with-duration-with-powerpress_get_enclosure_data-function/)
 * Hi guys,
    I’m using the function powerpress_get_enclosure_data(get_the_ID()) 
   to get the duration of the episode, in a custom postype. But in the loop in some
   cases the value “duration” that’s return the array it’s empty.
 *     ```
       <?php
       $EpisodeData = powerpress_get_enclosure_data( get_the_ID() );
       $episodeDuration = explode(':', $EpisodeData['duration']);
       $episodeMin = $episodeDuration[1]; 
   
       if( !empty($EpisodeData['duration']) ) {
           echo $episodeMin;
       }
       ?>
       ```
   
 * [https://drop.frontporchsolutions.com/i/cWk2wG](https://drop.frontporchsolutions.com/i/cWk2wG)
 *  Any idea why happend this? Thanks in advance
    -  This topic was modified 3 years, 7 months ago by [frontpor](https://wordpress.org/support/users/frontpor/).

Viewing 1 replies (of 1 total)

 *  Plugin Support [Shawn](https://wordpress.org/support/users/shawnogordo/)
 * (@shawnogordo)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/error-getting-with-duration-with-powerpress_get_enclosure_data-function/#post-16194583)
 * Which version of PowerPress are you using? An update was released in the last
   few days.

Viewing 1 replies (of 1 total)

The topic ‘Error getting the duration with powerpress_get_enclosure_data() function’
is closed to new replies.

 * ![](https://ps.w.org/powerpress/assets/icon.svg?rev=2849869)
 * [PowerPress Podcasting plugin by Blubrry](https://wordpress.org/plugins/powerpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/powerpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/powerpress/)
 * [Active Topics](https://wordpress.org/support/plugin/powerpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/powerpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/powerpress/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Shawn](https://wordpress.org/support/users/shawnogordo/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/error-getting-with-duration-with-powerpress_get_enclosure_data-function/#post-16194583)
 * Status: not resolved