Notifications
Clear all

[Solved] Trying to access array offset on value of type null

12 Posts
2 Users
2 Reactions
443 Views
Posts: 50
Topic starter
(@upstartdm)
Trusted Member
Joined: 4 years ago

We're seeing a large number of PHP Warnings of the type:

Trying to access array offset on value of type null in /wp-content/plugins/wpforo/themes/2022/layouts/2/post.php on line [various numbers]

Trying to access array offset on value of type null in /stable/wp-content/plugins/wpforo/includes/functions-template.php on line 196

Our host is concerned that they may be leading to issues with stability of the PHP-FPM service, is there anything we can do to reduce these warnings (other than turn off notifications, of course)? We're running the latest version of wpForo.

11 Replies
Robert
Posts: 10526
Admin
(@robert)
Support Team
Joined: 8 years ago

Hi @upstartdm,

1. Please check the database issues in wpForo > Tools > Database Tables Tab. if you see any issue please click the [Solve Database Problems].

2. Go to wpForo > Settings > Member Rating admin page, scroll down and click [Update Options]

3. Go to wpForo > Overview admin page and click [Delete All Caches] button.

4. Make sure you don't have code snippets hooking wpForo plugin

5. Make sure you don't have outdated wpForo template files in the folder of current active theme.

 

Posts: 50
Topic starter
(@upstartdm)
Trusted Member
Joined: 4 years ago

Thanks, that's a useful reply but unfortunately we've tried all those steps and the warnings are still being logged. Is there anything more we can do to troubleshoot the root cause? We're running PHP version 8.2.12

6 Replies
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10526

@upstartdm,

Please provide the line numbers of 2022/layouts/2/post.php errors.

(@upstartdm)
Joined: 4 years ago

Trusted Member
Posts: 50

@robert Thanks, the line numbers of 2022/layouts/2/post.php are:

line 16

line 24

line 30

line 56

(the other lines we see warnings for are /includes/functions-template.php on line 196 and /classes/Actions.php on line 289)

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10526

@upstartdm,

This is not wpForo issue. This issue comes from incorrect data in database. So this issue only exists in your website. We could help you send admin login details to support[at]gvectors.com email address.

(@upstartdm)
Joined: 4 years ago

Trusted Member
Posts: 50

@robert Unfortunately our security policy does not allow 3rd party admin access but I can provide (sanitised) data privately if you tell me what you need (or if you can point me to a specific db location I can take a look myself). Thanks.

PS I should add we are also using the User Custom Fields, Private Messages and Polls addons.

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10526

@upstartdm,

Ok, please use one earlier version of wpForo and let us know if you see the same errors. I need to verify this is not 2.2.4 version issue.

(@upstartdm)
Joined: 4 years ago

Trusted Member
Posts: 50

@robert OK, happy to test that, how do I downgrade? Just download an older version of the files and overwrite?

Robert
Posts: 10526
Admin
(@robert)
Support Team
Joined: 8 years ago

Hi @upstartdm,

These issues are fixed in the 2.2.5 version. Please update your wpForo installation.

2 Replies
(@upstartdm)
Joined: 4 years ago

Trusted Member
Posts: 50

@robert Thank you very much indeed, this has completely solved the issue.

(@upstartdm)
Joined: 4 years ago

Trusted Member
Posts: 50

@robert BTW the logic of the "solved/unsolved" button at the top of this post appears wrong - it looks like the text needs to be "mark solved" or "mark unsolved" for it to make sense, i.e. to indicate a potential action rather than the current status (currently the status is displayed as "unsolved" within the topic but "solved" in the forum view which seems inconsistent and confusing).