News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

"Trying to access array offset on value of type null" in Subs-Editor.php

Started by Pyrhel, February 14, 2022, 05:50:45 AM

Previous topic - Next topic

Pyrhel

Several times a day in the error log I'm getting:

General Error "2: Trying to access array offset on value of type null"
on line 2263 of Subs-Editor.php file.

All errors are logged by guest users, but I cannot reproduce them - i've tried to access the page when logged-in and as a guest, but such errors are not generated.

I'll be glad to provide full info - tell me what you'll need.

Doug Heffernan

Quote from: Pyrhel on February 14, 2022, 05:50:45 AMSeveral times a day in the error log I'm getting:

General Error "2: Trying to access array offset on value of type null"
on line 2263 of Subs-Editor.php file.

All errors are logged by guest users, but I cannot reproduce them - i've tried to access the page when logged-in and as a guest, but such errors are not generated.

I'll be glad to provide full info - tell me what you'll need.

What version of smf do you use? And what version of php are you at?

Arantor

We've seen this bug reported before but we never got to the bottom of it. Looks like the anti spam Q&A cache isn't populated for some reason.

Pyrhel

Quote from: Doug Heffernan on February 14, 2022, 06:08:16 AMWhat version of smf do you use? And what version of php are you at?
I'm sorry, SMF 2.1.1 on PHP 8.0.15

If I can help tracing it - just write how I can help.

Doug Heffernan

Quote from: Pyrhel on February 14, 2022, 09:31:04 AM
Quote from: Doug Heffernan on February 14, 2022, 06:08:16 AMWhat version of smf do you use? And what version of php are you at?
I'm sorry, SMF 2.1.1 on PHP 8.0.15

If I can help tracing it - just write how I can help.

Can you downgrade php version to php 7.4 and see if the error will still occur?

Pyrhel


Pogo Stick

I had this same error a couple of times on 2.1.1, PHP 7.4.

I cleared the cache, not sure if that fixed it or not.

Sesquipedalian

I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Pyrhel



Pogo Stick

Quote from: Doug Heffernan on February 18, 2022, 08:16:05 AM
Quote from: Pyrhel on February 18, 2022, 02:26:28 AMSince I've switched to 7.4 the problems are gone.

Like I thought, a php version incompatibility.

Except that, as I said above, I got this same error with PHP 7.4

Doug Heffernan

Quote from: Pogo Stick on February 19, 2022, 06:14:09 AM
Quote from: Doug Heffernan on February 18, 2022, 08:16:05 AM
Quote from: Pyrhel on February 18, 2022, 02:26:28 AMSince I've switched to 7.4 the problems are gone.

Like I thought, a php version incompatibility.

Except that, as I said above, I got this same error with PHP 7.4

And as you can see, I was talking to the OP, not you.

Did you try the solution posted by @Sesquipedalian above?


Advertisement: