Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
1 registered (WriteOn), 12 Guests and 21 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 01/08/07
Posts: 48
Top Posters (30 Days)
Ruben Rocha 179
Gizmo 112
Rick 109
Thelockman 80
driv 43
AllenAyres 35
ntdoc 28
Ian 24
Sirdude 23
ScriptKeeper 20
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Topic Options
Rate This Topic
#2654 - 08/14/06 02:01 PM [FIXED in b4] B3: Invalid argument supplied for foreach() in doeditboard.php
Philipp Offline
journeyman

Registered: 07/29/06
Posts: 74
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?>");


Edited by Rick (08/14/06 02:39 PM)
_________________________
CompatDB.org Support Forums

Top
#2664 - 08/14/06 02:38 PM Re: B3: Invalid argument supplied for foreach() in doeditboard.php [Re: Philipp]
Rick Administrator Offline

*****

Registered: 06/04/06
Posts: 7898
Loc: Aberdeen, WA
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.
_________________________
UBB.threads™ Developer
My Personal Website · StogieSmokers.com

Top


Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Shrinking graemlins
by Djuma
Yesterday at 05:48 PM
2 problems I'm seeing now.
by DougMM
Yesterday at 04:39 PM
Which CSS Style Controls the bottom lines
by David DelMonte
Yesterday at 01:51 PM
UBBThreads vs. vBulletin -- Defections & Why So Tough to Compare?
by WebMagic
Yesterday at 12:28 PM
Font and column shifts occuring
by Bill B
11/30/08 06:21 PM
Forum Stats
4261 Members
33 Forums
30532 Topics
154962 Posts

Max Online: 978 @ 06/24/07 08:19 PM