Skip to content

Commit 001e971

Browse files
committed
Added check for $db
1 parent 9b9ab36 commit 001e971

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Codeception/Module/Phalcon4.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function _after(TestInterface $test)
198198
{
199199
if ($this->config['cleanup'] && isset($this->di['db'])) {
200200
$db = $this->di['db'];
201-
while ($db->isUnderTransaction()) {
201+
while (($db) && $db->isUnderTransaction()) {
202202
$level = $db->getTransactionLevel();
203203
try {
204204
$db->rollback(true);

0 commit comments

Comments
 (0)