Download & Extend

theme.inc throwing an error in latest cvs

Project:Drupal core
Version:6.x-dev
Component:base system
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I guess this may have been reported somewhere, but I am getting the following in the apache log:
[Wed May 24 17:01:22 2006] [error] [client 192.168.1.12] PHP Fatal error: Cannot use string offset as an array in /home/httpd/vhosts/httpdocs/includes/theme.inc on line 505, referer: http://regov-test.iied.org/en/node/10/delete

If I roll back a few revisions (to 1.295) it works ok, but I am also getting a load of warnings in the log (not sure if related) along the lines of:

[Wed May 24 17:02:50 2006] [error] [client 192.168.1.12] PHP Notice: Use of undefined constant primary_links - assumed 'primary_links' in /home/httpd/httpdocs/themes/curved_slate/template.php on line 40, referer: http://regov-test.iied.org/en/node/10/delete
[Wed May 24 17:02:50 2006] [error] [client 192.168.1.12] PHP Notice: Undefined index: #theme_used in /home/httpd/vhosts//httpdocs/includes/form.inc on line 506, referer: http://regov-test.iied.org/en/node/10/delete

Comments

#1

I am also receiving this error. When I try to upload picture with image module I get this error

fatal error: Cannot use string offset as an array in /var/www/html/drupal/includes/theme.inc on line 505

But then when I go to some other page I get "Your image was created".
As reported by bejam if I rollback theme.inc to revision 1.295 the problem is gone.
Digerati also writes about this problem at http://drupal.org/node/65942

#2

i had the same problem.
in image.module i fixed it with commenting out the following line

/* $links[] = l($size['label'], 'node/' . $node->nid, NULL, 'size=' . urlencode($size['label']));*/

and added this line instead
$links[] = array($size['label'],'node/' . $node->nid, NULL, 'size=' . urlencode($size['label']));

it schould work for other modules in the same way, i think.
(my current theme.inc version is 1.303)

#3

Category:bug report» support request

@bejam, @Rok Žlender and @carli: any news with the most recent HEAD?
My theme.in is the 1.315 and I could not reproduce the problem with image.module.

#4

It works fine for me with 1.315 theme.inc and 1.205 of image.module.

#5

Version:x.y.z» 6.x-dev
Status:active» fixed

#6

Status:fixed» closed (fixed)
nobody click here