xoops forums

goffy

Quite a regular
Posted on: 6/24 9:40
goffy
goffy (Show more)
Quite a regular
Posts: 369
Since: 2010/12/27
#1

newbb on xoops.org

Hi

which version of newbb is used on xoops.org?

with latest version from https://github.com/XoopsModules25x/newbb I get an error when I want to have the list with recent topics (like it is possible on xoops.org)
Quote:
Error: Cannot use string offset as an array in Datei /modules/newbb/class/TopicRenderer.php Zeile 745


I use:
Xoops 2.5.10
Latest Version of NewBB from github

Mamba

Moderator
Posted on: 6/24 11:10
Mamba
Mamba (Show more)
Moderator
Posts: 10770
Since: 2004/4/23
#2

Re: newbb on xoops.org

NewBB 5.0 and XOOPS 2.5.10
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

goffy

Quite a regular
Posted on: 6/24 12:12
goffy
goffy (Show more)
Quite a regular
Posts: 369
Since: 2010/12/27
#3

Re: newbb on xoops.org

so we use the same :-| but I get an error

I tried with php 7.2 and 7.3

any idea?

zyspec

Module Developer
Posted on: 6/24 16:18
zyspec
zyspec (Show more)
Module Developer
Posts: 1042
Since: 2004/9/21
#4

Re: newbb on xoops.org

@goffy,

It looks to me like there's a minor bug in the logic. $status is defined as a string variable, but later it is accessed as an array.

The code in ./class/TopicRenderer.php (line 730) is:
$status '';


Should be changed to:
$status = [];

goffy

Quite a regular
Posted on: 6/24 18:43
goffy
goffy (Show more)
Quite a regular
Posts: 369
Since: 2010/12/27
#5

Re: newbb on xoops.org

hi zyspec

I have already seen this. if I change as suggested I get Quote:
Fatal error: Maximum execution time of 120 seconds exceeded in C:\Homepages\wamp\www\myxoops\html\class\database\mysqldatabase.php on line 277


I try to find out the problem

zyspec

Module Developer
Posted on: 6/26 16:58
zyspec
zyspec (Show more)
Module Developer
Posts: 1042
Since: 2004/9/21
#6

Re: newbb on xoops.org

Ok - I'd recommend you turn on debug and look at the MySQL queries in debug to see if that leads you in the right direction.

The other thing to try is to look a the value of $types in the Smarty template debug information.

Hopefully one of these will lead you in the right direction. I don't use newbb on any of my sites (including my debug site) right now so I found the bug above by code inspection. There's probably something else that assumes $status is a string... looks like allowing "multiple" types was added somewhere along the way and by irmtfan after initial development.