[drupal-devel] [bug] Fatal error in tablesort.inc line 114 when using project.module

deekayen drupal-devel at drupal.org
Thu Jul 7 08:06:40 UTC 2005


Issue status update for 
http://drupal.org/node/26503
Post a follow up: 
http://drupal.org/project/comments/add/26503

 Project:      Drupal
 Version:      4.6.2
 Component:    base system
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  deekayen
 Updated by:   deekayen
 Status:       patch

When it throws the fatal error in tablesort.inc, $header is an empty
string, and $ts is NULL. Don't know if that helps with anything at all.




deekayen



Previous comments:
------------------------------------------------------------------------

July 7, 2005 - 01:57 : deekayen

Attachment: http://drupal.org/files/issues/tablesort.inc_for_project.patch (782 bytes)

Something in project.module doesn't play friendly with tablesort_cell()
in tablesort.inc and it causes a fatal error on tablesort.inc's line
114 using PHP 5.0.4 on Win32. I'm not able to reproduce it on my PHP
5.1.0-dev Win32 machine. Whatever it is seems to happen before watchdog
records the error to the mysql log, so I haven't tracked down the exact
cause, but simply modifying the if statement on line 114 to add another
isset() makes the fatal error go away. If php.ini's error reporting is
turned off or set to log only, the fatal error causes the display to be
completely blank.


The error was:


Fatal error: Cannot use string offset as an array in
C:\........\includes\tablesort.inc on line 114


The error specifically refers to $ts['name'] (checked by breaking the
if statement into multiple lines and turning on php.ini's error
printing). Like I said, on my PHP 5.1.0-dev machine, the var_dump()s of
$header and $ts look correct for both value and variable type. This only
happens on project node pages except for /project.


Attached is a patch diff'ed against HEAD.







More information about the drupal-devel mailing list