WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Warning: Missing argument 2 for wpdb::prepare() (8 posts)

  1. wpsecuritylock
    Member
    Posted 1 year ago #

    Warning: Missing argument 2 for wpdb::prepare(), called in /PATH/public_html/wp-content/plugins/redirection/models/group.php on line 70 and defined in /PATH/public_html/wp-includes/wp-db.php on line 990

    http://wordpress.org/extend/plugins/redirection/

  2. definitio
    Member
    Posted 1 year ago #

    Getting the same warning on the backend...

  3. syimen
    Member
    Posted 1 year ago #

    I got the same warning.
    This is no fun, please take time to fix this.

    Everyone please read this, http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/

    Thanks

  4. Sith Lord Goz
    Member
    Posted 1 year ago #

    +1

  5. operapreneur
    Member
    Posted 1 year ago #

    +1

  6. chiappa
    Member
    Posted 1 year ago #

    + \o/

  7. Stephanie Leary
    Member
    Posted 1 year ago #

    This happened because of a change in 3.5. Redirection isn't vulnerable; it was just using $wpdb->prepare() unnecessarily.

    Open up models/group.php and change line 70 to:

    $rows = $wpdb->get_results( "SELECT {$wpdb->prefix}redirection_modules.name AS module_name,{$wpdb->prefix}redirection_groups.name AS group_name,{$wpdb->prefix}redirection_groups.id FROM {$wpdb->prefix}redirection_groups INNER JOIN {$wpdb->prefix}redirection_modules ON {$wpdb->prefix}redirection_modules.id={$wpdb->prefix}redirection_groups.module_id ORDER BY {$wpdb->prefix}redirection_modules.name,{$wpdb->prefix}redirection_groups.position" );
  8. byronj
    Member
    Posted 1 year ago #

    Worked perfectly! Thanks so much.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic