WordPress的电子邮件下载插件显示错误消息

时间:2018-08-01 16:45:21

标签: php wordpress email plugins

此页面上我正在使用电子邮件,然后下载wordpress插件

https://sviluppo.babbasons.com/prova-download/

和此产品页面

https://sviluppo.babbasons.com/prodotto/ak/

这是错误

“警告:count():参数必须是在/web/htdocs/sviluppo.babbasons.com/home/wp-content/plugins/email-before-download/includes/class中实现Countable的数组或对象-email-before-download-db.php在第56行“

这是代码摘要

public function item_exists($data)
{

    //check if item exists and if it needs updated
    $query = $this->db->get_row("SELECT  * FROM $this->item_table WHERE download_id = '" . $data['download_id'] . "'");
    if (count($query) > 0) {
        if ($query->file != $data['file']) {
            $this->db->update($this->item_table,
                array('file' => $data['file']),
                array('id' => $query->id)
            );
        }
        if ($query->title != $data['title']) {
            $this->db->update($this->item_table,
                array('title' => $data['title']),
                array('id' => $query->id)
        );
        }
        return $query->id;
    }
    return false;

}

在产品页面上,它卡住了

有人知道如何解决这个问题吗?

谢谢

0 个答案:

没有答案