Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何解决WooCommerce中的PHP断言失败错误?_Php_Wordpress_Woocommerce_Assert_Assertion - Fatal编程技术网

如何解决WooCommerce中的PHP断言失败错误?

如何解决WooCommerce中的PHP断言失败错误?,php,wordpress,woocommerce,assert,assertion,Php,Wordpress,Woocommerce,Assert,Assertion,对于我托管的网站,我在Apache错误日志中遇到以下错误: PHP警告:assert()[function.assert]:在第259行的/wp content/plugins/woocmerce cart reports/models/AV8_cart_receive.PHP中断言失败 该网站正在运行WoodPress 3.6.1和WooCommerce 2.0.14。该错误与Cart Reports插件有关,我正在运行该插件的1.0.2版 这里是来自…/plugins/woocmerce c

对于我托管的网站,我在Apache错误日志中遇到以下错误:

PHP警告:assert()[function.assert]:在第259行的/wp content/plugins/woocmerce cart reports/models/AV8_cart_receive.PHP中断言失败

该网站正在运行WoodPress 3.6.1和WooCommerce 2.0.14。该错误与Cart Reports插件有关,我正在运行该插件的1.0.2版

这里是来自…/plugins/woocmerce cart reports/models/AV8_cart_receive.php的第259行

assert($this->post_id >0); //Make sure we're working with a valid post id.
下面是上下文的整个函数:

 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());
    }

我应该如何进行故障排除和/或解决此错误?

反向工作。$this->post_id从何而来,为什么此时不大于0?