Previous Thread
Next Thread
Print Thread
Hop To
Joined: Aug 2004
Posts: 4
M
stranger
stranger
M Offline
Joined: Aug 2004
Posts: 4
Hey guys,

I've converted an OLD, OLD (v4.4) wwwthreads message board to 6.4.4. All of the posts, etc, and features work, except I get the error below, only on imported (imported via alter tables) threads that have zero replies. New posts with 0 replies do not get the warning. This also only happens when a user is looking at the post in threaded mode. Any hints/tips?

(obscured the path purposefully)

Warning: array_keys(): The first argument should be an array in /path/to/boards/showthreaded.php on line 97

The line is:
$parentkeys = array_keys($tree[$currentkey]);

Joined: Aug 2004
Posts: 4
M
stranger
stranger
M Offline
Joined: Aug 2004
Posts: 4
Smashed this bug myself - this might be a forgotten piece of code since it wasn't expected to affect anything...

There are two calls to show_replies() in showthreaded.php

One call has this guard:
if (isset($tree[$PNumber]['children'])) {

The other has no guard, so I added the following:
if (isset($tree[$current]['children'])) {

and it seems to be working correctly so far.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Weird characters showing up
by Baldeagle - 06/17/2024 12:36 AM
Upgrading supporting apps (mysql, php)
by Baldeagle - 06/09/2024 8:39 AM
Questions re: forum layout and site issues
by domspeak - 06/03/2024 1:49 AM
Test
by Phun - 05/28/2024 7:31 PM
Who's Online Now
1 members (Ruben), 461 guests, and 183 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)