I installed the module and created a new menu and got the error. Rewriting line 21 to use empty() rather than is_null() solves the problem since empty will return true if the array key doesn't exist as well as if the value of the array key is null.

before:

/**
 * Implements hook_menu_link_alter().
 */
function menu_rules_menu_link_alter(&$item) {
  if(is_null($item['weight'])) {
    $item['weight'] = 0;
  }
}

after:

/**
 * Implements hook_menu_link_alter().
 */
function menu_rules_menu_link_alter(&$item) {
  if(empty($item['weight'])) {
    $item['weight'] = 0;
  }
}

Comments

ordermind’s picture

Status: Active » Fixed

Thanks, it will be fixed in the next development release.

ordermind’s picture

Status: Fixed » Closed (fixed)