Closed (fixed)
Project:
Shorten URLs
Version:
6.x-1.5
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2010 at 10:11 UTC
Updated:
1 Feb 2010 at 05:20 UTC
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
Comment #1
wszachau commentedApologies, line number should be shorten.module:224.
Comment #2
icecreamyou commentedThanks for catching that -- I could have sworn I fixed that before. Committed the second fix.