Php Errors

CS Cart is pumping out a lot of PHP errors. 99% of the same one.

[Thu Jan 07 10:21:13.805645 2021] [proxy_fcgi:error] [pid 2126398:tid 140146653521664] [client 46.149.34.245:60386] AH01071: Got error 'PHP message: PHP Notice: Undefined index: in /home/*mydomain*/domains/*mydomain*.nl/public_html/app/functions/fn.database.php on line 505'

On line 505 i have just the following

$params['sort_order_rev'] = $directions[$params['sort_order']];


Second one is:

[Thu Jan 07 10:21:22.115640 2021] [proxy_fcgi:error] [pid 2139149:tid 140147886626560] [client 66.249.64.205:53372] AH01071: Got error 'PHP message: PHP Notice: Undefined index: variant in /home/*mydomain*/domains/*mydomain*.nl/public_html/app/addons/seo/func.php on line 2914'

// fallback to product features
if ($brand === null) {
$features = fn_seo_gather_product_features($product_data);
foreach ($features as $feature_data) {
if ($feature_data['feature_type'] === ProductFeatures::EXTENDED) {
$brand = $feature_data['variant']; (line 2914)
}
}

Anyone has an idea what this can be?

You re using older version of CSC... just replace loop in file: app/addons/seo/func.php:

// fallback to product features
	//changed 0101
    if ($brand === null) {
        $features = fn_seo_gather_product_features($product_data);
        foreach ($features as $feature_data) {
            if ($feature_data['feature_type'] === ProductFeatures::EXTENDED) {
                if (isset($feature_data['variant'])) {
                    $brand = $feature_data['variant'];
                } else {
                    $brand_feature_data = fn_get_product_feature_variant($feature_data['variant_id']);
                    $brand = !empty($brand_feature_data['variant']) ? $brand_feature_data['variant'] : null;
                }
            }
        }
	}