Title: Array access warnings
Last modified: February 20, 2022

---

# Array access warnings

 *  Resolved [Antipole](https://wordpress.org/support/users/antipole/)
 * (@antipole)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/array-access-warnings/)
 * I am getting the following pairs of error messages logged:
 * > Notice: Trying to access array offset on value of type int in /home/antipole/
   > public_html/ovni-owners-test-site/wp-content/plugins/all-in-one-wp-security-
   > and-firewall/classes/wp-security-user-login.php on line 566
   > Warning: array_diff(): Expected parameter 2 to be an array, int given in /home/
   > antipole/public_html/ovni-owners-test-site/wp-content/plugins/all-in-one-wp-
   > security-and-firewall/classes/wp-security-user-login.php on line 564
 * I am seeing this while testing with the theme 2020 and only the following plugins
   active:
    - All In One WP Security
    - Error Log Monitor
    - Really Simple SSL
 * AIOWPS 4.4.10
    WP 5.9 PHP 7.4.27
 * This has echoes of [another issue I reported a while](https://wordpress.org/support/topic/php-error-trying-to-access-array-offset-on-value-of-type-bool-2/)
   back but this present one is on a single site.
    Any help will be much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/array-access-warnings/#post-15388760)
 * Hi,
 * This looks like it relates to the “users online” functionality.
    I think it might
   be an issue related to how the variables are declared. Unfortunately I will have
   to ask our developers to have a look.
 *  Plugin Contributor [Prashant Baldha](https://wordpress.org/support/users/pmbaldha/)
 * (@pmbaldha)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/array-access-warnings/#post-15393327)
 * [@antipole](https://wordpress.org/support/users/antipole/) I have tried to replicate
   the issue in PHP 8.0 and PHP 8.1, but I cannot replicate the issue.
 * Can you please give me steps to reproduce the issue?
 * Can you please tell me which PHP version you are using?
 * Thank You!
 *  Thread Starter [Antipole](https://wordpress.org/support/users/antipole/)
 * (@antipole)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/array-access-warnings/#post-15396429)
 * I have been struggling to narrow down why I am getting this and you not.
 * Today I have not been seeing the error. So I gradually re-enabled everything 
   and still no error!
    Then suddenly it reappeared and stayed even after I disabled
   everything again! So it is not about a particular statement but rather about 
   a state.
 * Looking at the code, it is dealing with who is logged in. Clearly I am logged
   in – otherwise I would not be able to see the error log in the backend. But I
   am wondering whether there is an issue with update_users_online_transient() whereby
   it sometimes gets confused about who is logged on?
 * I see mentions the code of transient records. Could there be an issue here – 
   like if the plugin is disabled while the use logs in and then it is enabled it,
   might it lead to the issue? Or what if the plugin is disabled when the transient
   expires?
 * Just guessing here but I think it is something like this.
 * PS as per my original post:
    AIOWPS 4.4.10 WP 5.9 PHP 7.4.27
    -  This reply was modified 4 years, 2 months ago by [Antipole](https://wordpress.org/support/users/antipole/).
 *  Plugin Contributor [Prashant Baldha](https://wordpress.org/support/users/pmbaldha/)
 * (@pmbaldha)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/array-access-warnings/#post-15402779)
 * [@antipole](https://wordpress.org/support/users/antipole/) I am not able to replicate
   the issue again. If you observe specific series of events that produce the error,
   Then Can you please mail me on the [pbaldha@updraftplus.com](https://wordpress.org/support/topic/array-access-warnings/pbaldha@updraftplus.com?output_format=md)
   with mentioning this support thread link?
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Array access warnings’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-wp-security-and-firewall/assets/icon-256x256.
   png?rev=2798307)
 * [All-In-One Security (AIOS) – Security and Firewall](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Prashant Baldha](https://wordpress.org/support/users/pmbaldha/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/array-access-warnings/#post-15402779)
 * Status: resolved