Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: aswuser on August 14, 2022, 12:11:52 PM

Title: 8: Trying to access array offset on value of type null - Security.php
Post by: aswuser on August 14, 2022, 12:11:52 PM
I am trying to troubleshoot and resolve this error. I have been getting it since recovering from hack which damaged my db. That part is fixed but this error remains.


Backtrace information


File: Security.php (various lines)

URL of page causing the error - various but they are links to attachments.



    #0: smf_error_handler()
    Called from /Sources/Security.php on line 348
    #1: is_not_banned()
    Called from /index.php on line 237
    #2: smf_main()
    Called from /index.php on line 191



What I just noticed is that they are all coming from same IP as "Guest". Could this be the hacker? Should I block the IP?



SMF 2.1.2
PHP Version 7.4.30
MySQL Version    10.3.28-MariaDB-cll-lve
No mods installed in SMF
Title: Re: 8: Trying to access array offset on value of type null - Security.php
Post by: Steve on August 14, 2022, 07:39:40 PM
Quote from: aswuser on August 14, 2022, 12:11:52 PMShould I block the IP?
I would. At least temporarily. When banning IPs you run the risk of banning legitimate users.
Title: Re: 8: Trying to access array offset on value of type null - Security.php
Post by: Kindred on August 15, 2022, 03:00:41 AM
No ...   the issue has (99.99% chance) nothing to do with a hack at all.

The issue you are seeing is because the data passed in a security check is incorrect, possibly due to a mod.
Title: Re: 8: Trying to access array offset on value of type null - Security.php
Post by: aswuser on August 19, 2022, 12:35:22 AM
Kindred, Can you please elaborate?

We don't have any modifications installed.
Title: Re: 8: Trying to access array offset on value of type null - Security.php
Post by: Steve on August 19, 2022, 02:32:23 PM
When he has a chance, this may help him more:

What mods do you have installed? (a list, not an image if possible please)
Title: Re: 8: Trying to access array offset on value of type null - Security.php
Post by: Doug Heffernan on August 19, 2022, 04:13:27 PM
Quote from: Steve on August 19, 2022, 02:32:23 PMWhat mods do you have installed? (a list, not an image if possible please)

Quote from: aswuser on August 19, 2022, 12:35:22 AMWe don't have any modifications installed.
Title: Re: 8: Trying to access array offset on value of type null - Security.php
Post by: Steve on August 19, 2022, 05:08:02 PM
Oops. Somehow totally missed that.  :-[
Title: Re: 8: Trying to access array offset on value of type null - Security.php
Post by: aswuser on August 19, 2022, 05:58:29 PM
Well, I blocked the IP address and the errors have stopped.
Title: Re: 8: Trying to access array offset on value of type null - Security.php
Post by: Kindred on August 19, 2022, 09:26:57 PM
But you didn't solve the problem...  only delayed it to the next time