When using the shorten module on sites that use ssl (i.e. where the url starts with https://) it fails to return a shortened value.
This is caused by line 230 in shorten.module:

  if ($url && drupal_substr($url, 0, 7) == 'http://') {
    return $url;
  }

which should rather be either

   if ($url && drupal_substr($url, 0, 4) == 'http') {
    return $url;
  }

or

  if ($url && (drupal_substr($url, 0, 7) == 'http://' || drupal_substr($url,0,8) == 'https://')) {
    return $url;
  }

Comments

wszachau’s picture

Apologies, line number should be shorten.module:224.

icecreamyou’s picture

Status: Active » Fixed

Thanks for catching that -- I could have sworn I fixed that before. Committed the second fix.

Status: Fixed » Closed (fixed)

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