Fatal error: Unsupported operand types in /home/directotio/public_html/propietario/includes/common.inc on line 1426 | Develop Site

During the construction of a site in Drupal modules and enable or disable the browser duevuelve me the following error:

    Fatal error: Unsupported operand types in /home/directotio/public_html/propietario/includes/common.inc on line 1426

This problem arises because changes the way drupal strate functions l() and url() when you are migrating from one version to another. For example version 5.X to 6.X.

The solution is to add the following code in the file include/common.inc:

    /**
    * Add this code under the line that says:
    * `function url($path = NULL, $options = array()) {`
    * (originally in line 1368)
    */
    // Convert arguments and move on...
    if (!is_array($options)) {
    $options = array();
    $args = func_get_args();
    if (isset($args[1])) $options['query'] = $args[1];
    if (isset($args[2])) $options['fragment'] = $args[2];
    if (isset($args[3])) $options['absolute'] = $args[3];
    }

    /**
    * He adds this code under the line that says:
    * `function l($text, $path, $options = array()) {`
    * (originally in line 1541)
    */
    // Convert arguments and move on...
    if (!is_array($options)) {
    $options = array();
    $args = func_get_args();
    if (isset($args[2])) $options['attributes'] = $args[2];
    if (isset($args[3])) $options['query'] = $args[3];
    if (isset($args[4])) $options['fragment'] = $args[4];
    if (isset($args[5])) $options['absolute'] = $args[5];
    if (isset($args[6])) $options['html'] = $args[6];
    }

Foro

English