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
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
0 members (), 407 guests, and 105 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)