Support » Developing with WordPress » We are using a plugin, it is throwing a PHP Error

  • Resolved arufasari

    (@arufasari)


    So we are using the Share Logins Pro from codexperts. The developer is terrible with support, we pay for his package and for all the money we pay, the plugin does not work. It’s throwing this error:

    PHP message: PHP Warning: Invalid argument supplied for foreach() in /www/wp-content/plugins/share-logins/includes/functions.php on line 379

    This is line 379: $new_array[$new_key[0]] = $value;

    This is lines 374-383:

    foreach ( $array as $key => $value ) {
    $value = $value == ‘on’ && $site_added == 1 ? 1 : 0;

    if( strpos( $key, ‘-‘) ){
    $new_key = explode( ‘-‘, $key );
    $new_array[$new_key[0]] = $value;
    }else{
    $new_array[$key] = $value;
    }
    }

    I am not a PHP developer, by any means, but it looks like he’s defining the $new_key array as 0? Is there something wrong there that anyone development-oriented can see, and does anyone have a recommended fix I can get rid of this error until there may be a dev response from the plugin developer? I can’t revert the plugin to an older version using some sort of rollback plugin.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘We are using a plugin, it is throwing a PHP Error’ is closed to new replies.