• Resolved Howdy_McGee

    (@howdy_mcgee)


    Whenever I filter by Active / Inactive I receive this error:

    Warning: Missing argument 2 for wpdb::prepare(), called in /wp-content/plugins/membership/membershipincludes/classes/class.membersearch.php on line 142 and defined in /wp-includes/wp-db.php on line 1147

    Just wanted to give you guys a head up.

    https://wordpress.org/plugins/membership/

Viewing 1 replies (of 1 total)
  • Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi @howdy_mcgee

    Greetings and thanks for posting on the forums.

    I got the same warning message on my test site when i try to filter memberhsip members by status( Active / Inactive ) therefore i have notified the plugin developer to fix it.

    This is a simple PHP warning, it is nothing to worry about but you can fix this warning message by making changes in the following Membership plugin file on line number 142

    Membership plugin file:
    membership/membershipincludes/classes/class.membersearch.php

    Before Editing:

    $sql = $wpdb->prepare( "SELECT user_id FROM " . $wpdb->usermeta . " WHERE meta_key = '" . membership_db_prefix($wpdb, 'membership_active', false) . "' AND meta_value = 'no'" );

    After Editing:

    $sql = "SELECT user_id FROM " . $wpdb->usermeta . " WHERE meta_key = '" . membership_db_prefix($wpdb, 'membership_active', false) . "' AND meta_value = 'no'";

    Note: You are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these again after plugin updation.

    Have a great day!

    Cheers,
    Vinod Dalvi

Viewing 1 replies (of 1 total)
  • The topic ‘Filter Active / Inactive PHP Error’ is closed to new replies.