From 8f565050654dfb60d6a911319ab42454cf3e1b54 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 30 Sep 2019 18:26:26 +0200 Subject: [PATCH] fix #3091 @0:10 --- app/Models/Product.php | 10 +++++----- app/Models/Specification.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Models/Product.php b/app/Models/Product.php index 1db343e..2bf747b 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -278,9 +278,9 @@ class Product extends CubistMagicPageModel } $specValue = ' - '; - if ($specEntity->type == 'numeric' || $specEntity->type == 'numeric_list') { + if ($specEntity->type === 'numeric' || $specEntity->type === 'numeric_list') { $specValue = $specEntity->prefix; - if ($specEntity->type == 'numeric_list' && is_array($val)) { + if ($specEntity->type === 'numeric_list' && is_array($val)) { $specValue .= ' ' . implode(' ' . $specEntity->separator . ' ', $val); } else { if (is_array($val)) { @@ -289,14 +289,14 @@ class Product extends CubistMagicPageModel $specValue = $val; } $specValue .= ' ' . $specEntity->unit; - } else if ($specEntity->type == 'text') { + } else if ($specEntity->type === 'text') { $specValue = trim($val); - } else if ($specEntity->type == 'range') { + } else if ($specEntity->type === 'range') { if (!isset($val['first']) || !isset($val['second']) || (!$val['first'] && !$val['second'])) { continue; } $specValue = $val['first'] . ' ' . __('à') . ' ' . $val['second'] . ' ' . $specEntity->unit; - } else if ($specEntity->type == 'list') { + } else if ($specEntity->type === 'list') { if (is_array($val)) { continue; } diff --git a/app/Models/Specification.php b/app/Models/Specification.php index 0ba3d16..bca4d59 100644 --- a/app/Models/Specification.php +++ b/app/Models/Specification.php @@ -3,9 +3,9 @@ namespace App\Models; -use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel; +use Cubist\Backpack\app\Magic\Models\CubistMagicTranslatableModel; -class Specification extends CubistMagicAbstractModel +class Specification extends CubistMagicTranslatableModel { protected $table = 'catalog_specifications'; -- 2.39.5