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

[Db] The method delete on the RowGateway does not return anything #3862

Closed
wilsonrivera opened this issue Feb 22, 2013 · 0 comments
Closed

Comments

@wilsonrivera
Copy link

Looking through the code I found that de method delete on the class Zend\Db\RowGateway\RowGatewayAbstract does not return anything even when on its documentation says should return an integer.

The code looks like this:
if ($result->getAffectedRows() == 1) {
// detach from database
$this->primaryKeyData = null;
}
}

But should be:
$rowsAffected = $result->getAffectedRows();
if ($rowsAffected == 1) {
// detach from database
$this->primaryKeyData = null;
}
return $rowsAffected;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants