: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$copyrights = $copyrights_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
if (isset($credit['attribs']['']['role']))
$credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($credit['attribs']['']['scheme']))
$credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
$credit_scheme = 'urn:ebu';
if (isset($credit['data']))
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$credits[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
$credits = array_values(array_unique($credits));
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit']))
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit)
if (isset($credit['attribs']['']['role']))
$credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($credit['attribs']['']['scheme']))
$credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
$credit_scheme = 'urn:ebu';
if (isset($credit['data']))
$credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$credits[] = $this->registry->create('Credit', array($credit_role, $credit_scheme, $credit_name));
$credits = array_values(array_unique($credits));
$credits = $credits_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
$description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description']))
$description = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$description = $description_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash']))
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash)
if (isset($hash['data']))
$value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($hash['attribs']['']['algo']))
$algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
$hashes[] = $algo.':'.$value;
$hashes = array_values(array_unique($hashes));
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash']))
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash)
if (isset($hash['data']))
$value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($hash['attribs']['']['algo']))
$algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT);
$hashes[] = $algo.':'.$value;
$hashes = array_values(array_unique($hashes));
$hashes = $hashes_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords']))
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data']))
$temp = explode(',', $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
$keywords[] = trim($word);
$keywords = array_values(array_unique($keywords));
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords']))
if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data']))
$temp = explode(',', $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
$keywords[] = trim($word);
$keywords = array_values(array_unique($keywords));
$keywords = $keywords_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
$player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
$player = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
$player = $player_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
if (isset($rating['attribs']['']['scheme']))
$rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
$rating_scheme = 'urn:simple';
if (isset($rating['data']))
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$ratings[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
$ratings = array_values(array_unique($ratings));
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating']))
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating)
if (isset($rating['attribs']['']['scheme']))
$rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT);
$rating_scheme = 'urn:simple';
if (isset($rating['data']))
$rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$ratings[] = $this->registry->create('Rating', array($rating_scheme, $rating_value));
$ratings = array_values(array_unique($ratings));
$ratings = $ratings_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
$restriction_relationship = null;
$restriction_type = null;
$restriction_value = null;
if (isset($restriction['attribs']['']['relationship']))
$restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($restriction['attribs']['']['type']))
$restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($restriction['data']))
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$restrictions[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
if (is_array($restrictions))
$restrictions = array_values(array_unique($restrictions));
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction']))
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction)
$restriction_relationship = null;
$restriction_type = null;
$restriction_value = null;
if (isset($restriction['attribs']['']['relationship']))
$restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($restriction['attribs']['']['type']))
$restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($restriction['data']))
$restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$restrictions[] = $this->registry->create('Restriction', array($restriction_relationship, $restriction_type, $restriction_value));
if (is_array($restrictions))
$restrictions = array_values(array_unique($restrictions));
$restrictions = $restrictions_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail']))
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail)
$thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
if (is_array($thumbnails))
$thumbnails = array_values(array_unique($thumbnails));
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail']))
foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail)
$thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
if (is_array($thumbnails))
$thumbnails = array_values(array_unique($thumbnails));
$thumbnails = $thumbnails_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
$title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title']))
$title = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$this->data['enclosures'][] = $this->registry->create('Enclosure', array($url, $type, $length, null, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width));
// If we have standalone media:content tags, loop through them.
if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content']))
foreach ((array) $this->data['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content)
if (isset($content['attribs']['']['url']) || isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player']))
// Start checking the attributes of media:content
if (isset($content['attribs']['']['bitrate']))
$bitrate = $this->sanitize($content['attribs']['']['bitrate'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['channels']))
$channels = $this->sanitize($content['attribs']['']['channels'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['duration']))
$duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT);
$duration = $duration_parent;
if (isset($content['attribs']['']['expression']))
$expression = $this->sanitize($content['attribs']['']['expression'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['framerate']))
$framerate = $this->sanitize($content['attribs']['']['framerate'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['height']))
$height = $this->sanitize($content['attribs']['']['height'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['lang']))
$lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['fileSize']))
$length = intval($content['attribs']['']['fileSize']);
if (isset($content['attribs']['']['medium']))
$medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['samplingrate']))
$samplingrate = $this->sanitize($content['attribs']['']['samplingrate'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['type']))
$type = $this->sanitize($content['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['width']))
$width = $this->sanitize($content['attribs']['']['width'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($content['attribs']['']['url']))
$url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI);
// Checking the other optional media: elements. Priority: media:content, media:group, item, channel
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text']))
foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption)
$caption_startTime = null;
if (isset($caption['attribs']['']['type']))
$caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($caption['attribs']['']['lang']))
$caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($caption['attribs']['']['start']))
$caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($caption['attribs']['']['end']))
$caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT);
if (isset($caption['data']))
$caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT);
$captions[] = $this->registry->create('Caption', array($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text));
$captions = array_values(array_unique($captions));
$captions = $captions_parent;
if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category']))
foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category)