Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

\Zend\Db\Adapter\Driver\Pdo\Connection::rollback error #385

@sorkl

Description

@sorkl

public function rollback()

the function code like bellow maybe more better

    public function rollback()
    {
        if (!$this->isConnected()) {
            throw new Exception\RuntimeException('Must be connected before you can rollback');
        }

        if (!$this->inTransaction()) {
            throw new Exception\RuntimeException('Must call beginTransaction() before you can rollback');
        }

        if (0 === $this->nestedTransactionsCount) {
            $this->resource->rollBack();
            $this->nestedTransactionsCount = 0;
        }

        return $this;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions