for some reason $r_url was empty and parse_url func was breaking on that. so I had to add an extra check in the below function

function _feeds_tamper_absolute_url($r_url, &$urls, $b) {
  if(empty($r_url)){
    return;
  }
  $r = parse_url($r_url);

Comments

TechNikh’s picture

also I had to do this to handle images in google news rss feeds https://news.google.com/news/feeds?output=rss&q=%22rti%20act%22
description has //nt3.ggpht.com/news/tbn/b0UpRelFgmEtpM/6.jpg
which has to be converted to https://nt3.ggpht.com/news/tbn/b0UpRelFgmEtpM/6.jpg

if(substr($r_url,0,2)=="//"){
    $r_url = "http:".$r_url;
  }
twistor’s picture

Status: Active » Postponed (maintainer needs more info)

What was your configuration that gave you an empty value?

Breaking how, there's already a check to see if the parse failed?

  if ($r == FALSE) {
    return;
  }

Handling scheme relative urls would be a different issue.

  • twistor committed 4ee27db on 7.x-1.x
    Issue #1979210 by TechNikh: Fixed check if url is empty in absolute_url...
twistor’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Patch (to be ported)

  • twistor committed 6768aef on 6.x-1.x
    Issue #1979210 by TechNikh: Fixed check if url is empty in absolute_url...
twistor’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Component: Miscellaneous » Plugins
Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.