2016-10-31 4 views
1

Ich bekomme einen protokollierten Fehler mit meinem Magento-Backend für diese etwa alle 5 Minuten und seine Verwendung viel von meinem Standortspeicher wegen wie häufig dieser Fehler protokolliert wird. Was soll ich tun, um diesen Fehler zu beheben?Magento Logged Fehler: "Warnung: array_filter() erwartet Parameter 1 Array, Null gegeben in ...."

Ich habe einen Dateinamen und Zeile gegeben worden:

FrontendConfigurableProductMatrix/controllers/CartController.php on line 55

hier ist der Code für die Zeilen 50-60:

unset($params['product_matrix']); 

    $product_matrix = $this->getRequest()->getParam('product_matrix'); 

    if (count(array_filter($product_matrix['qty'])) == 0) { 
     if(count($params['super_attribute']) != 0 && count($params['super_attribute']) == count(array_filter($params['super_attribute']))) { 
      $product_matrix = array(); 
      $product_matrix['qty'] = array($params['product'] => $params['qty']); 
      $product_matrix[$params['product']] = $params; 
     } else { 

Antwort

0
unset($params['product_matrix']); 

$product_matrix = $this->getRequest()->getParam('product_matrix'); 

if (is_array($product_matrix['qty']) && count(array_filter($product_matrix['qty'])) == 0) { 
if(count($params['super_attribute']) != 0 && count($params['super_attribute']) == count(array_filter($params['super_attribute']))) { 
    $product_matrix = array(); 
    $product_matrix['qty'] = array($params['product'] => $params['qty']); 
    $product_matrix[$params['product']] = $params; 
} else { 
Verwandte Themen