WordPress.org

Ready to get started?Download WordPress

Forums

Cimy User Extra Fields
[resolved] Warnings with new version of Cimy User Extra Fields (5 posts)

  1. curlybracket
    Member
    Posted 1 year ago #

    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/

  2. curlybracket
    Member
    Posted 1 year ago #

    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\"", ""));
  3. curlybracket
    Member
    Posted 1 year ago #

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

  4. Marco Cimmino
    Member
    Plugin Author

    Posted 1 year ago #

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

  5. curlybracket
    Member
    Posted 1 year ago #

    Thank you Marco :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.