警告:内爆():传入的参数无效 header.php

Warning: implode(): Invalid arguments passed in header.php

安装我的扩展后,我在我的管理页面中看到这个错误:

Warning: implode(): Invalid arguments passed in /Applications/XAMPP/xamppfiles/htdocs/store/admin/controller/common/header.php on line 58 Warning: implode(): Invalid arguments passed in /Applications/XAMPP/xamppfiles/htdocs/store/admin/controller/common/header.php on line 59 Warning: implode(): Invalid arguments passed in /Applications/XAMPP/xamppfiles/htdocs/store/admin/controller/common/header.php on line 62 Warning: implode(): Invalid arguments passed in /Applications/XAMPP/xamppfiles/htdocs/store/admin/controller/common/header.php on line 63

header.php

    // Processing Orders
    $data['order_status_total'] = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_processing_status'))));
    $data['order_status'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'] . '&filter_order_status=' . implode(',', $this->config->get('config_processing_status')), 'SSL');

    // Complete Orders
    $data['complete_status_total'] = $this->model_sale_order->getTotalOrders(array('filter_order_status' => implode(',', $this->config->get('config_complete_status'))));
    $data['complete_status'] = $this->url->link('sale/order', 'token=' . $this->session->data['token'] . '&filter_order_status=' . implode(',', $this->config->get('config_complete_status')), 'SSL');

在数据库中(complete_status_total):

a:1:{i:0;s:1:"7";}

我该如何解决这个错误?!

你需要unserialize那个。

例如:

$data = 'a:1:{i:0;s:1:"7";}'
$unserialized_data = unserialize($data); //Unserialized string to array
print_r($unserialized_data);

$imploded_data = implode(',', unserialized_data); //Implode your array
echo $imploded_data;