WordPress.org

Ready to get started?Download WordPress

Forums

iThemes Security (formerly Better WP Security)
[resolved] Undefine variable iwp_action in WPBS V3.4.7 (9 posts)

  1. rdaley
    Member
    Posted 1 year ago #

    I just installed WPBS V3.4.7 onto WP V3.5.1.

    I now get the message:
    Notice: Undefined variable: iwp_action in /home/scwp/public_html/wp-content/plugins/better-wp-security/inc/secure.php on line 22

    when UI view the site and can no longer login.

    ANy cnace there is a quick fix to avoid having to restore from backup?

    http://wordpress.org/extend/plugins/better-wp-security/

  2. cliffrohde
    Member
    Posted 1 year ago #

    I get the same error message since updating to 3.4.7

  3. cliffrohde
    Member
    Posted 1 year ago #

    Also this:

    Warning: Cannot modify header information - headers already sent by (output started at /home/[...] /wp-content/plugins/better-wp-security/inc/secure.php:22) in /home/content/92/9531192/html/rwpdev/wp-includes/pluggable.php on line 876

  4. Joolee
    Member
    Posted 1 year ago #

    I have changed lines 15-26 of inc/secure.php to:

    //set a global variable if this is a call from InfiniteWP
    			$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
    			$data = base64_decode( $HTTP_RAW_POST_DATA );
    			if ( $data && ($unserialized_data = @unserialize( $data ))) {
    				$iwp_action = $unserialized_data['iwp_action'];
    			}
    			if ( isset($iwp_action) ) {
    				$isIWP = true;
    			} else {
    				$isIWP = false;
    			}
  5. 3five
    Member
    Posted 1 year ago #

    We're seeing the same issue with this plugin. Is this on the official bug list yet?

  6. salubrio
    Member
    Posted 1 year ago #

    @Joolee, was the change you made only to line 22?

    Original:

    if ( $iwp_action ) {

    Change:

    if ( isset( $iwp_action ) ) {

  7. This should be fixed in 3.4.8

  8. Joolee
    Member
    Posted 1 year ago #

    I also changed line 19 & 20 to:

    if ( $data && ($unserialized_data = @unserialize( $data ))) {

    This prevents the system from giving an error when updating a plugin. I don't know the details of the problem but this seems to work.

  9. amadex
    Member
    Posted 1 year ago #

    Up to the moment, the change that produced results was the one at lines 19 and 20:
    "if ( $data && ($unserialized_data = @unserialize( $data ))) {"

    Is there any official fix on this and/or offical feedback about this being the correct solution?!...

    Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic