diff --git a/index.php b/index.php index ac46ca26..00a51305 100644 --- a/index.php +++ b/index.php @@ -106,7 +106,7 @@ try { } $_shm_ctx->log_endok(); } catch (Exception $e) { - if ($database) { + if ($database && $database->transaction===true) { $database->rollback(); } _fatal_error($e);