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.
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?
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.
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.
Quote from: Pyrhel on February 14, 2022, 09:31:04 AMQuote 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?
Hello, I've set it to 7.4 and I'll report back soon.
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.
This sounds like #7304 (https://github.com/SimpleMachines/SMF2.1/issues/7304), which has a pending fix in #7312 (https://github.com/SimpleMachines/SMF2.1/pull/7312).
Since I've switched to 7.4 the problems are gone.
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.
Quote from: Doug Heffernan on February 18, 2022, 08:16:05 AMQuote 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
Quote from: Pogo Stick on February 19, 2022, 06:14:09 AMQuote from: Doug Heffernan on February 18, 2022, 08:16:05 AMQuote 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?