Getting a few odd errors - a lot of warnings. The site has just tons of modules so this may be difficult to pin down - if you think it can't be dealt with, some debug approach could help.

Notice: Uninitialized string offset: 0 in _tabtamer_sort() (line 354 of /sites/default/modules/tabtamer/tabtamer.module).
lines 355, 358 and 354 all have some of this error.

This is the more severe one:
Warning: uasort(): Array was modified by the user comparison function in tabtamer_tabs_form() (line 341 of /modules/tabtamer/tabtamer.module).
So the issue is somewhere in here. Possibly causing this (although I don't know how i'd get so many warnings from small alterations) I have a different custom module that alters some other aspect of the menu router (i.e. changes an access callback for user edit, as well as its title) - I'd have to add debug statements to get at it - and i'm not familiar with the uasort & what the purpose there is.

function tabtamer_tabs_form() {
.......

  // Put the tabs in the order that the menu system uses.
  foreach (array_keys($tabs) as $base) {
    uasort($form[$base], '_tabtamer_sort');
  }

  $form['submit'] = array('#type' => 'submit', '#value' => t('Save'));
  $form['reset'] = array('#type' => 'submit', '#value' => t('Reset to Defaults'));

  return $form;
}

/**
 * Helper function used to determine the order that tabs appear in Druapal.
 */
function _tabtamer_sort($a, $b) {
  if ($a['weight'] == $b['weight']) {
    return strcmp($a['#title'], $b['#title']);
  }
  else {
    return $a['weight'] < $b['weight'] ? -1 : 1;
  }
}

It's a pretty unwieldy site so I'm not sure where to suss out more info on this condition. Great module, thanks!

Comments

hongpong’s picture

Title: Tabtamer Uninitialized string offset, » Tabtamer Uninitialized string offset, Array was modified by the user comparison function on tab sort
lamp5’s picture

Status: Active » Closed (outdated)