Problem/Motivation

I'm getting the following notice whenever the main shortening service is not available (and the fallback one needs to be used):

Notice: Undefined variable: url in shorten_url() (line 149 of /mnt/www/html/eluniversodev/docroot/sites/all/modules/shorten/shorten.module).

Proposed resolution

The $url variable should be initialized to a default value at the beginning of the shorten_url function:

function shorten_url($original = '', $service = '') {
  $url = '';

Comments

IceCreamYou’s picture

Status: Active » Fixed

Committed fix to dev: 7.x, 6.x

The reason that fix should work is that trim() coerces input to a string without complaining.

Status: Fixed » Closed (fixed)

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