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

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

Comments

Projects
None yet
2 participants
@wilsonrivera

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 join this conversation on GitHub. Already have an account? Sign in to comment