API page: http://api.drupal.org/api/drupal/includes%21common.inc/function/url/6

Enter a descriptive title (above) relating to function url, then describe the problem you have found:

When running simpletest through drush I get the error:
Trying to get property of non-object in url() (line 1534 of common.inc).

The line:

<?php
$path = drupal_get_path_alias($path, isset($options['language']) ? $options['language']->language : '');
?>

Should:

<?php
isset($options['language'])
?>

be changed to:

<?php
isset($options['language']->language)
?>

Comments

yngens’s picture

Not sure if mine is the same issue, but I am getting:

drush cc all
PHP Fatal error:  Call to undefined function drupal_get_path_alias() in /home/mysite/public_html/includes/common.inc on line 1534
Drush command terminated abnormally due to an unrecoverable error.                                                                          [error]
Error: Call to undefined function drupal_get_path_alias() in /home/mysite/public_html/includes/common.inc, line 1534

Fatal error: Call to undefined function drupal_get_path_alias() in /home/mysite/public_html/includes/common.inc on line 1534

Changing the offending line to:

$path = drupal_get_path_alias($path, isset($options['language']->language) ? $options['language']->language : '');

didn't help.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.