diff --git a/src/Codeception/Module/AMQP.php b/src/Codeception/Module/AMQP.php index ff70cd9..41b85d7 100644 --- a/src/Codeception/Module/AMQP.php +++ b/src/Codeception/Module/AMQP.php @@ -100,7 +100,8 @@ public function _before(TestInterface $test): void $this->cleanup(); } - if ($this->config['reconnect']) { + // Nullsafe can be removed if the class is made final + if ($this->config['reconnect'] ?? false) { $this->getChannel()->getConnection()->reconnect(); } }