PHP warning in models/pager.php line 106
-
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 ) );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP warning in models/pager.php line 106’ is closed to new replies.