Title: Warnings while editing posts/pages
Last modified: January 31, 2024

---

# Warnings while editing posts/pages

 *  Resolved [saltykey](https://wordpress.org/support/users/saltykey/)
 * (@saltykey)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/)
 * I’m seeing the following warnings displaying when I turn on wp_debug:
 * _**Warning**: foreach() argument must be of type array|object, null given in **/
   public\_html/wp-content/plugins/ithemes-security-pro/core/lib/class-itsec-lib-
   fingerprinting.php** on line **44**_
 * The warnings only appear when I’m editing a post, page, etc. Obviously not an
   urgent issue, but wanted to report.
 * I’m using the latest version of the WordPress (6.4.3.), I’m using Gutenberg, 
   I have the latest version of Solid Security Pro (8.3.1), and I’m on PHP 8.1.27.

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

 *  Plugin Support [chandelierrr](https://wordpress.org/support/users/shanedelierrr/)
 * (@shanedelierrr)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17389846)
 * Hi [@saltykey](https://wordpress.org/support/users/saltykey/), we’re here to 
   help!
 * I’ve seen few reports of this error, but I haven’t been able to replicate it 
   in any of my test sites yet. A possible cause of this warning could be due to
   a corruption during the update process or something caused the property that 
   the `foreach` loop is trying to iterate to not be initialized correctly.
 * I do have a workaround which is manually re-installing the Solid Security Pro
   plugin files. This way we can ensure the plugin files aren’t corrupted. Here 
   are the steps on how to do this:
    1. Back up your site as preventive measure.
    2. Download the latest plugin ZIP from your SolidWP Member Panel.
    3. Deactivate the currently installed Solid Security Pro plugin using FTP/Host 
       CPanel by renaming the plugin folder.
    4. Reload your WP Admin Dashboard, go to the_ _Plugins page, and make sure the 
       plugin is showing as deactivated.
    5. Install the downloaded plugin ZIP from the SolidWP Member Panel.
    6. WP will detect that the folder already exists and click “Replace current with
       uploaded” (see sample [here](https://share.zight.com/mXuvvkpL))
    7. Once the upload finishes, activate the plugin, and reload the site to check 
       if the warning still shows.
 * If the issue persists, please reach out to us on the SolidWP support channel 
   so we can assist you.
 * I hope this helps!
 *  [laurajacob1986](https://wordpress.org/support/users/laurajacob1986/)
 * (@laurajacob1986)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17422065)
 * Hi there,
 * I am having the same issue on most of my clients sites. Is the only solution 
   this manual reïnstall? I have quite alot of sites, so just want to make sure 
   before I go this route 😊
 *  [nlpro](https://wordpress.org/support/users/nlpro/)
 * (@nlpro)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17423835)
 * Hi [@laurajacob1986](https://wordpress.org/support/users/laurajacob1986/),
 * Try it first on one site just to see whether a manual reinstall of the plugin(
   or if not already, simply updating to the latest 8.3.2 release) helps resolve
   this issue or not. If not we’ll have to think about going a different route to
   solve this issue.
 * One other thing, is the **Trusted Devices** feature enabled ?
 * +++ To prevent any confusion, I’m not SolidWP +++
 *  [hassan](https://wordpress.org/support/users/sangshenas/)
 * (@sangshenas)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17428283)
 * I noticed today that whenever I log into the admin dashboard with two-step login(
   authentication), the following error appears in the host errors twice:
 *     ```wp-block-code
        PHP Warning:  Invalid argument supplied for foreach() in public_html/wp-content/plugins/ithemes-security-pro/core/lib/class-itsec-lib-fingerprinting.php on line 44
       ```
   
 *  [nlpro](https://wordpress.org/support/users/nlpro/)
 * (@nlpro)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17429282)
 * Hi [@sangshenas](https://wordpress.org/support/users/sangshenas/),
 * PHP < 8 returns a bit of a different warning message. A PHP Stack Trace would
   be helpful. Also do you have the **Trusted Devices** feature enabled ?
 *  Thread Starter [saltykey](https://wordpress.org/support/users/saltykey/)
 * (@saltykey)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17429310)
 * Hi [@shanedelierrr](https://wordpress.org/support/users/shanedelierrr/),
 * I tried the steps you provided. The error persists, but when I disabled the ithemes-
   security-pro folder via FTP, I never got the “Replace current with uploaded” 
   option. Instead, it just disabled the plugin when I renamed it (just added an
   underscore (_) in front of it) and then added Solid Security again. ([See screenshot](https://www.saltykey.com/wp-content/uploads/2024/02/Screenshot-2024-02-15-171110.png).)
 * Still getting this error, but only on pages using the Gutenberg editor (and only
   when wp_debug is enabled): _**Warning**: foreach() argument must be of type array
   |object, null given in **/public\_html/wp-content/plugins/ithemes-security-pro/
   core/lib/class-itsec-lib-fingerprinting.php** on line **44** _
 * ![](https://i0.wp.com/www.saltykey.com/wp-content/uploads/2024/02/Screenshot-
   2024-02-15-171110.png?ssl=1)
 *  [hassan](https://wordpress.org/support/users/sangshenas/)
 * (@sangshenas)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17429371)
 * hi [@nlpro](https://wordpress.org/support/users/nlpro/) ,
   no that is not enabled.
 *  [nlpro](https://wordpress.org/support/users/nlpro/)
 * (@nlpro)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17430287)
 * Hi [@sangshenas](https://wordpress.org/support/users/sangshenas/),
 * Does the PHP warning persist after enabling the **Trusted Devices** feature ?
   Please also share the exact Solid Security and PHP version you are using.
    -  This reply was modified 2 years, 3 months ago by [nlpro](https://wordpress.org/support/users/nlpro/).
 *  Plugin Support [chandelierrr](https://wordpress.org/support/users/shanedelierrr/)
 * (@shanedelierrr)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17436207)
 * Hi [@saltykey](https://wordpress.org/support/users/saltykey/), thanks for trying
   the steps! We have an open internal ticket to track this error. Could you contact
   us in our priority support channel from your my.solidwp.com account so we can
   add your ticket and update you on its progress?
 * Hi [@laurajacob1986](https://wordpress.org/support/users/laurajacob1986/) and
   [@sangshenas](https://wordpress.org/support/users/sangshenas/), if the error 
   persists after trying out the manual re-install steps, please open a support 
   ticket via our priority support channel so we can also update you there.
 * Thank you!
 *  [nlpro](https://wordpress.org/support/users/nlpro/)
 * (@nlpro)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17436377)
 * [@shanedelierrr](https://wordpress.org/support/users/shanedelierrr/),
 * > … or something caused the property that the `foreach` loop is trying to iterate
   > to not be initialized correctly.
 * That may very well be the case. I’m putting my money on line #14 (Pro 8.3.2) 
   in the core/lib/class-itsec-lib-fingerprinting.php file:
 *     ```wp-block-code
       private static $sources; //null
       ```
   
 * … which may need to be initialized like so:
 *     ```wp-block-code
       private static $sources = array(); //Empty array
       ```
   
 * The above is based on some fundamental/isolated PHP code tests. I have yet to
   reproduce the PHP warning in WordPress/SolSec Pro. It probably only happens under
   certain very specific conditions. Typical edge case.
    -  This reply was modified 2 years, 3 months ago by [nlpro](https://wordpress.org/support/users/nlpro/).
 *  Plugin Support [chandelierrr](https://wordpress.org/support/users/shanedelierrr/)
 * (@shanedelierrr)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17438958)
 * Hi [@nlpro](https://wordpress.org/support/users/nlpro/), thanks for sharing your
   thoughts! I’ve added this to the internal ticket so our dev team will know. Please
   feel free to ping us anytime you need clarification.
 *  Plugin Support [chandelierrr](https://wordpress.org/support/users/shanedelierrr/)
 * (@shanedelierrr)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17467023)
 * Hi All,
   I’m circling back here to let you know that a fix for this has been released
   on Solid Security Pro v8.4.0. Kindly update to the latest version and let us 
   know if you’re still seeing the error.
 * Cheers!

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

The topic ‘Warnings while editing posts/pages’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=3529351)
 * [Kadence Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

 * 12 replies
 * 5 participants
 * Last reply from: [chandelierrr](https://wordpress.org/support/users/shanedelierrr/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/warnings-while-editing-posts-pages/#post-17467023)
 * Status: resolved