WordPress.org

Ready to get started?Download WordPress

Forums

Audit Trail
PHP warning in models/pager.php line 106 (2 posts)

  1. Ian Dunn
    Member
    Posted 1 year ago #

    Viewing the Audit Trail screen with PHP's display_errors turned on reveals this error:

    Warning: Missing argument 2 for wpdb::prepare(), called in /var/www/vhosts/example.com/httpdocs/wp/content/plugins/audit-trail/models/pager.php on line 106 and defined in /var/www/vhosts/example.com/httpdocs/wp/wordpress/wp-includes/wp-db.php on line 990

    WPDB::prepare() requires 2 arguments, so...

    $total_items  = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->prefix}audit_trail" ) );

    ...should be changed to...

    $total_items  = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->prefix}audit_trail", null ) );

    http://wordpress.org/extend/plugins/audit-trail/

  2. Ian Dunn
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.