Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jul 2006
Posts: 117
Likes: 4
P
Member
Member
P Offline
Joined: Jul 2006
Posts: 117
Likes: 4
I just discovered that the foreach() bug in line 334 of doeditboard.php is still there.

A possible fix is replacing:

Code
 foreach ($tree['tree'] as $k => $v) {

with:

Code
 foreach ($tree as $k => $v) {

after $tree['tree'] does not exist in cache/forum_list.php

Speaking of forum_list.php, there is a semicolon missing at the end of the array. To fix this, replace the following line in ubbthreads.inc.php:

Code
 	lock_and_write("{$config['FULL_PATH']}/cache/forum_list.php","<?php\n\$tree = " . var_export($tree,true) . "?>");
with:

Code
 	lock_and_write("{$config['FULL_PATH']}/cache/forum_list.php","<?php\n\$tree = " . var_export($tree,true) . ";\n?>");

Last edited by Rick; 08/14/2006 5:39 PM.
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
The $tree['tree'] portion of the array will only exist if there are subforums, so I added a check to see if that key exists and just skip the loop if it doesn't.

Thanks for the info on the missing semicolon.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Who's Online Now
1 members (1 invisible), 347 guests, and 100 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)