If i go to admin/build/menu-customize/primary-links
i get this error:
Fatal error: Unsupported operand types in /home/domainfoo.bar/public_html/drupal6/includes/common.inc on line 1548(as admin / user/1 an as a user with priveleges. I tried this workaround to track down the bug, with no result: http://drupal.org/node/362799 The output is still the same :?

using Drupal 6.9. The error showed up after moving from a PHP4 to PHP5 server

Comments

Anonymous’s picture

This can easily be fixed (at least on my system) by changing the method l($text, $path, $options) as follows:

Change:

function l($text, $path, $options = array()) {
  // Merge in defaults.
  $options += array(
      'attributes' => array(),
      'html' => FALSE,
    );

to:

function l($text, $path, $options = array()) {
  // Merge in defaults.
  if ( ! is_array($options) ) {
/*
// Remove comments to enable backtrace()
    $backtrace = debug_backtrace();
    var_export($backtrace[0]);
*/
      $options = array($options);
  }
  
  $options += array(
      'attributes' => array(),
      'html' => FALSE,
    );

Note: I am using captcha, captcha_pack, cck, i18n, imce, languageicons, print, simplenews, tinytinymce, views, views_slideshow

This happens if $options (as handed to l()) is not an array. Please be aware that the above "solution" simply throws away any non-array-options handed to l().

Traceback:

array (
  'file' => 'drupal-6.9/modules/menu/menu.admin.inc',
  'line' => 72,
  'function' => 'l',
  'args' => 
  array (
    0 => 'spanish menu entry containing utf-characters',
    1 => 'node/7',
    2 => false,
  ),

-- edit:
Reason for problem:
At least in my case the problem was related to ill defined menues. I am using language-constraints for menues (e.g. primary links contains all menue entries for multiple languages). One of those entries was ill-defined. After deleting this menu-entry everything works again, without changing l().

This problem could be fixed if calls to l() check "is_array" before using "+=" or if _menu_overview_tree_from() in menu.admin.inc would check $item['localized options'].

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

@Lenn-art: Which modules are you using? Could you please check for ill-defined menu-entries and for nodes, whose menu-entries cannot be changed?

Possibly related to / same as: http://drupal.org/node/328110

dave reid’s picture

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing this issue because of a lack of activity.