• I know it is posted several times and that it has to do with the upgrade to WordPress 3.6. But as i am not a programmer / developer, i hope to get some help to fix this problem.

    I would like to run GTM System buddypress on my install. Several errors i allready fixed, but still get this one:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/leader/public_html/xxxxx/wp-content/plugins/bp-gtm-system/lib/roles.php on line 267 and defined in /home/leader/public_html/xxxxx/wp-includes/wp-db.php on line 992

    If i look to the code on that line:

    $exist = $wpdb->query($wpdb->prepare(“
    SELECT id
    FROM {$bp->gtm->table_roles_caps}
    WHERE group_id = $group_id AND user_id = $user_id”));

    and same kind of error for line 293:

    if(!$exist){
    $result = $wpdb->query($wpdb->prepare(“
    INSERT INTO {$bp->gtm->table_roles_caps}
    (user_id,group_id, role_id)
    VALUES ($user_id, $group_id, $role_id)”));

    Can some help me to get the code right?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Warning: Missing argument 2 for wpdb::prepare()’ is closed to new replies.