Skip to content

Commit 2d8a4c7

Browse files
Eugene ShakhsuvarovEugene Shakhsuvarov
authored andcommitted
Merge branch 'fix-fatal-error-on-trim' of github.com:nazarklovanych/magento2 into 2.4-develop-prs
2 parents ad636b3 + e6a2d87 commit 2d8a4c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/Magento/Framework/Amqp/Config.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
*/
66
namespace Magento\Framework\Amqp;
77

8+
use Magento\Framework\Amqp\Connection\Factory as ConnectionFactory;
89
use Magento\Framework\Amqp\Connection\FactoryOptions;
910
use Magento\Framework\App\DeploymentConfig;
1011
use Magento\Framework\App\ObjectManager;
11-
use PhpAmqpLib\Connection\AbstractConnection;
1212
use PhpAmqpLib\Channel\AMQPChannel;
13-
use Magento\Framework\Amqp\Connection\Factory as ConnectionFactory;
13+
use PhpAmqpLib\Connection\AbstractConnection;
1414

1515
/**
1616
* Reads the Amqp config in the deployed environment configuration
@@ -140,7 +140,7 @@ public function getValue($key)
140140
*/
141141
private function createConnection(): AbstractConnection
142142
{
143-
$sslEnabled = $this->getValue(self::SSL) && trim($this->getValue(self::SSL)) === 'true';
143+
$sslEnabled = trim($this->getValue(self::SSL) ?? '') === 'true';
144144
$options = new FactoryOptions();
145145
$options->setHost($this->getValue(self::HOST));
146146
$options->setPort($this->getValue(self::PORT));

0 commit comments

Comments
 (0)