WordPress.org

Ready to get started?Download WordPress

Forums

Olimometer
[resolved] Missing argument 2 for wpdb::prepare() error (3 posts)

  1. smayernik
    Member
    Posted 5 months ago #

    Installed and activated plugin only to get an error message "Missing argument 2 for wpdb::prepare()...." and more stuff I don't understand...

    a little research and mentions of possible SQL injection vulnerability and...

    help?

    https://wordpress.org/plugins/olimometer/

  2. gmarsh
    Member
    Posted 5 months ago #

    Change line 1303 of olimometer.php

    from
    $olimometer_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $table_name;" ) );

    to
    $olimometer_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM %d;", $table_name ) );

    That should fix it.

  3. oshingler
    Member
    Plugin Author

    Posted 4 months ago #

    I've just rolled this out to the main release. v2.51 should include this fix shortly.

Reply

You must log in to post.

About this Plugin

About this Topic