From 3c04b7927f12596af22aafe91a8b2e7713916d16 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 12 Aug 2019 12:16:12 +0200 Subject: [PATCH] wip #2936 @0:20 --- app/Models/Product.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Product.php b/app/Models/Product.php index b236f68..8fa9f25 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -282,9 +282,10 @@ class Product extends CubistMagicModel $specValue = $val['first'] . ' ' . __('à') . ' ' . $val['second'] . ' ' . $specEntity->unit; } else if ($specEntity->type == 'list') { $option = Json::decodeRecursive($specEntity->options, Json::TYPE_ARRAY)[$val]; + $locale = App::getLocale(); if (!isset($option[$locale]) || !$option[$locale]) { - $specValue = $option['fr']; + $specValue = $option['fr'] ?? ''; } else { $specValue = $option[$locale]; } -- 2.39.5