Jump to content


Welcome to the forum:

Welcome to the iThemes, PluginBuddy and WebDesign.com forum. We've created several tutorial video's to help you get you started with using the forum, please check them out!

Also take note of the forum guidelines.


Support hours:

Our moderators actively respond to forum support requests during normal business hours which are Monday-Friday, 8am - 5pm Central Standard Time, typically within one business day. Although some moderators choose to work during the weekends, we can not guarantee immediate attention to your requests. Thanks for understanding.

What is included with support:

Premium support includes theme/plugin issues such as: bugs encountered under normal operation, how to use basic features, basic WordPress help, and basic help with customization (meaning we point you to resources and will help in more depth as time allows). More information.

information

Php Warning: Invalid Argument Supplied For Foreach() In Wp-Content/plugins/better-Wp-Security/core/class-Itsec-Lockout.php On Line 339



3 replies to this topic

#1 Guest_Lincoln Ramsay_*

Guest_Lincoln Ramsay_*
  • Guests

Posted 08 April 2014 - 02:54 PM

Here's the whole error message.

[07-Apr-2014 12:30:57 UTC] PHP Warning:  Invalid argument supplied for foreach() in .../wp-content/plugins/better-wp-security/core/class-itsec-lockout.php on line 339

I got a few of these in my error_log and wp-admin/error_log overnight.

Wordpress 3.8.1
iThemes Security 4.0.17

The line it's complaining about is the last in this group:

$white_ips = $itsec_globals['settings']['lockout_white_list'];
if ( $current === true ) {
    $white_ips[] = ITSEC_Lib::get_ip(); //add current user i
}
foreach ( $white_ips as $white_ip ) {

My whitelist is empty... Is it coming though as null instead of an empty list?

Would this help?

$white_ips = $itsec_globals['settings']['lockout_white_list'];
if (is_null($white_ips))
    $white_ips = [];

I also just noticed there's a Wordpress 3.8.2 and iThemes Security 4.0.18 update. I've just installed them so maybe the problem goes away...


Oh, and the message editor on this forum sucks. It either isn't a text field or if plays with accelerators such that Cmd-Left (the key combo for "go to beginning of the line") is passed to the browser instead, which goes back and loses the whole message. I had to resort to typing out my comment in an external editor after losing my message twice!

#2 Guest_Lincoln Ramsay_*

Guest_Lincoln Ramsay_*
  • Guests

Posted 08 April 2014 - 05:02 PM

Yep... Fixed in 4.0.18. Now it does this:

if ( is_array( $white_ips ) && sizeof( $white_ips > 0 ) ) {

#3 Guest_John L_*

Guest_John L_*
  • Guests

Posted 11 April 2014 - 12:04 PM

Hi,
I just started experiencing this error after adding ithemes security.
Page not found when looking for my homemade login url or the wp-login.php one.
A blank white space is at the top showing:
Warning: Invalid argument supplied for foreach() in /hermes/bosoraweb078/b1418/sl.docannco/public_html/wp-content/plugins/better-wp-security/core/class-itsec-lockout.php on line 339
Please advise!

#4 Gerroald

Gerroald

    iThemes Support

  • Moderators
  • Others: All Plugins, All Themes, Toolkit, Webdesign
  • 3,499 posts
  • LocationiThemes World HQ

Posted 17 April 2014 - 04:25 PM

Hey John,

Be sure to stay up to date. A very near release will address this other issues!

For further support:

If you have purchased the iThemes Security Pro plugin, please post your support request here: https://ithemeshelp.zendesk.com/home

If you are using the free version, please post on the WordPress.org support forums: http://wordpress.org/support/plugin/better-wp-security

Thanks,

Gerroald




    Reply to this Topic


    ATTENTION
    If this topic is marked RESOLVED or INFORMATION, or if you are NOT experiencing EXACTLY the same issue, please start a new topic to provide the details of your problem. If the solution provided doesn't work for you, you should start a new topic. If you feel this thread contains relevant information, you may include a link to it in your new topic. To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. When posting your question or request on the forum, please be as concise and specific as possible. The shorter and more to the point you can make your request, the better.

    For BackupBuddy related issues, be sure to include the status log from your most recent backup.

    CLICK HERE to start a new topic in the Support for Free Themes forum.


      



    Also tagged with one or more of these keywords: information

    0 user(s) are reading this topic

    0 members, 0 guests, 0 anonymous users