diff --git a/src/Repository/PaymentMethodLangRepository.php b/src/Repository/PaymentMethodLangRepository.php index aee18af0a..223400541 100644 --- a/src/Repository/PaymentMethodLangRepository.php +++ b/src/Repository/PaymentMethodLangRepository.php @@ -37,7 +37,7 @@ public function savePaymentTitleTranslation(string $idPaymentMethod, int $langId 'id_shop' => $idShop, ]); - $multiLangObject = new \MolPaymentMethodLang(isset($paymentMethodLangObject) ? $paymentMethodLangObject->id : null); + $multiLangObject = new \MolPaymentMethodLang($paymentMethodLangObject->id ?? null); $multiLangObject->id_lang = $langId; $multiLangObject->id_method = $idPaymentMethod; $multiLangObject->id_shop = $idShop;