Firefox PHP

[Patch] Notice: Undefined index: tz_offset inphorum/list.php on line 181

Posted by rfc 
All files from this thread

File Name File Size   Posted by Date  
patch_missing_tz_offset.zip 576 bytes open | download rfc 05/12/2011 Read message
rfc
[Patch] Notice: Undefined index: tz_offset inphorum/list.php on line 181
May 12, 2011 02:53PM
Hi,

here's a patch to fix this undefined index which only occurs under the following conditions:
  • Put Phorum into read only mode
  • Ensure message cache is active
  • Open a list view
  • Not be logged in (i.e. admin), just anonymous
  • The viewed forum must have "count_views" configured to "no"

There's an error in the user initialization for the Read-Only state in common.php which sets up a fake anonymous user but misses tz_offset dummy value (default from database) to be set.

This is tested and verified with 5.2.16

HTH

PS: trac wouldn't let me create a new ticket
Attachments:
open | download - patch_missing_tz_offset.zip (576 bytes)
Hi RFC, Have you tried to do a pull request in GitHub yet ?
Sorry, only registered users may post in this forum.

Click here to login