[support] Array

Dale McGladdery torelad at gmail.com
Wed Feb 7 18:14:24 UTC 2007


Hi Gina,

>> f.. Theme being used (very important, as pointed out by someone here).
>
> My own version of  Interlaced.

I suspect it's mostly related to your theme code. I've seen this
happen with themes that haven't been updated to Drupal 5. A number of
the php variables changed to arrays.

> the upper menu and the comment text only says Array

I've encounter the menu problem myself. In my case in template.php the
theme used:
  $links = menu_primary_links();
  if ($links) {
    $output .= '<ul>';
    foreach ($links as $link) {
      $output .= '<li>' . $link . '</li>'; // In 4.7 $link is string
    };
    $output .= '</ul>';
  }
  return $output;

which I changed to:

  $links = menu_primary_links();
  if ($links) {
    $output .= '<ul>';
    foreach ($links as $link) {
      // In 5 $link is an array, so use l() function to make into a HTML link
      $output .= '<li>' . l($link['title'], $link['href']) . '</li>';
    };
    $output .= '</ul>';
  }
  return $output;

If this kind of thing is the cause of your problem you'll need to
track down how the variables have changed and update accordingly, or
wait until Interlaced is updated for Drupal 5.

              . . . Dale


More information about the support mailing list