Support » Plugin: Cimy User Extra Fields » Warnings with new version of Cimy User Extra Fields

  • Resolved curlybracket

    (@veganist)


    Hello,

    I get this error in my backoffice since latest update :

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/www/html/rike/mysite.com/wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php on line 101 and defined in /home/www/html/rike/mysite.com/wp-includes/wp-db.php on line 990

    It’s just a warning, the fields are displayed correctly afterwards.

    http://wordpress.org/extend/plugins/cimy-user-extra-fields/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I actually managed to repair this.
    prepare() needs to arguments : $query and $args.
    So i just modified the file wp-content/plugins/cimy-user-extra-fields/cimy_uef_profile.php

    on line 101 from

    $value = $wpdb->get_var($wpdb->prepare("SELECT VALUE FROM ".$wpdb_data_table." WHERE USER_ID=".$get_user_id." AND FIELD_ID=".$field_id));

    to

    $value = $wpdb->get_var($wpdb->prepare("SELECT VALUE FROM ".$wpdb_data_table." WHERE USER_ID=".$get_user_id." AND FIELD_ID=".$field_id, ""));

    and on line 105 from

    $radio_checked[$name] = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM ".$wpdb_data_table." WHERE USER_ID=".$get_user_id." AND FIELD_ID=".$field_id." AND VALUE=\"selected\""));

    to

    $radio_checked[$name] = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM ".$wpdb_data_table." WHERE USER_ID=".$get_user_id." AND FIELD_ID=".$field_id." AND VALUE=\"selected\"", ""));

    Modifying the values in the backoffice works, so i guess this topic is resolved.

    Plugin Author Marco Cimmino

    (@cimmo)

    This has been fixed in trunk already, v2.3.12 will have the patch.

    Thank you Marco 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Warnings with new version of Cimy User Extra Fields’ is closed to new replies.