diff --git a/app/code/Magento/Config/Model/Config/Backend/Encrypted.php b/app/code/Magento/Config/Model/Config/Backend/Encrypted.php index d97283ce7ff64..af53ce1458b67 100644 --- a/app/code/Magento/Config/Model/Config/Backend/Encrypted.php +++ b/app/code/Magento/Config/Model/Config/Backend/Encrypted.php @@ -10,7 +10,8 @@ namespace Magento\Config\Model\Config\Backend; -class Encrypted extends \Magento\Framework\App\Config\Value implements \Magento\Framework\App\Config\Data\ProcessorInterface +class Encrypted extends \Magento\Framework\App\Config\Value implements + \Magento\Framework\App\Config\Data\ProcessorInterface { /** * @var \Magento\Framework\Encryption\EncryptorInterface @@ -58,7 +59,9 @@ public function __sleep() public function __wakeup() { parent::__wakeup(); - $this->_encryptor = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Framework\Encryption\EncryptorInterface'); + $this->_encryptor = \Magento\Framework\App\ObjectManager::getInstance()->get( + 'Magento\Framework\Encryption\EncryptorInterface' + ); } /** @@ -87,9 +90,7 @@ public function beforeSave() if (!preg_match('/^\*+$/', $value) && !empty($value)) { $this->_dataSaveAllowed = true; $encrypted = $this->_encryptor->encrypt($value); - if ($encrypted) { - $this->setValue($encrypted); - } + $this->setValue($encrypted); } }