Merge branch 'ticket-10444' into develop

This commit is contained in:
Marion Muszynski 2016-07-12 17:36:04 +02:00
commit a8136e01e3

View File

@ -300,16 +300,16 @@ class MakeStats {
$res2 = Db::getInstance()->ExecuteS($req2);
foreach ($res2 as $k => $value) {
if((int)$value['product_attribute_id']!=0
if(isset($value['product_attribute_id'])
&& $key = array_search($value['product_attribute_id'], array_column($res, 'product_attribute_id'))
&& $key
&& $key['product_id'] == $value['product_id']
&& $res[$key]['product_id'] == $value['product_id']
) {
unset($res2[$k]);
} elseif ((int)$value['product_attribute_id']==0
} elseif (!isset($value['product_attribute_id'])
&& $key = array_search($value['product_id'], array_column($res, 'product_id'))
&& $key
&& (int)$key['product_attribute_id'] == 0
&& (int)$res[$key]['product_attribute_id'] == 0
){
unset($res2[$k]);
}