Thanks who everyone who replied. Here's the offending code (line #51 is marked with -->)
// Automatically add a class to each link and also to each LI if (isset($link['attributes']) && isset($link['attributes']['class'])) { $link['attributes']['class'] .= ' ' . $key; $class = $key; } else { --> $link['attributes']['class'] = $key; $class = $key; }
2008/3/26, Larry Garfield larry@garfieldtech.com:
On Tuesday 25 March 2008, Albert Cuesta wrote:
Hi
Our hosting provider upgraded PHP4 to PHP5, and now some parts of our Drupal 5.x site have stopped working.
This is what we are getting when trying to access many pages:
Fatal error: Cannot use string offset as an array in /home/MYSITE/public_html/sites/all/themes/MYSITE/template.php on line 51
Any suggestions for fixing this?
Thank you!
There are several array handling functions that are supposed to take an array and an array. In PHP 4, you could be lazy and pass a string as the second parameter and PHP would silently convert it to a one-element array for you. PHP 5 requires you to pass a for-reals array as the second parameter. It sounds like that is what you're running into.
Check to see what's on line 51, and see the PHP manual for any functions youre using. If that's not it, then as others have said "show us the code!" :-)
-- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson
-- [ Drupal support list | http://lists.drupal.org/ ]