For a website I host I’m encountering the following error in my Apache error_log:
PHP Warning: assert() [function.assert]: Assertion failed in <>/wp-content/plugins/woocommerce-cart-reports/models/AV8_Cart_Receipt.php on line 259
The site is running WordPress 3.6.1 with WooCommerce 2.0.14. The error is in reference to a the Cart Reports plugin, of which I’m running version 1.0.2.
Here is line 259 from …/plugins/woocommerce-cart-reports/models/AV8_Cart_Receipt.php
assert($this->post_id >0); //Make sure we're working with a valid post id.
And here is the entire function for context:
public function update_receipt() {
assert($this->sid != '');
global $wpdb;
global $offset;
assert($offset != '' && is_numeric($offset));
assert($this->post_id >0); //Make sure we're working with a valid post id.
update_post_meta($this->post_id, 'av8_cartitems', $this->add_titles_to_cart_items($this->products));
$post_updated = array(
'ID' => $this->post_id,
'post_title'=>$this->post_title,
'post_author'=>$this->post_author,
'post_date' => $this->post_date,
'post_type' => 'carts'
);
wp_update_post($post_updated);
update_post_meta($this->post_id, "av8_last_updated", gmmktime());
}
How should I go about troubleshooting and/or resolving this error?