Skip to content

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

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

2 participants

@derpcoder

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;
}

@weierophinney weierophinney added a commit that closed this issue Mar 11, 2013
@weierophinney weierophinney Merge branch 'hotfix/3871'
Close #3871
Fixes #3862
e5f223b
@ghost Unknown pushed a commit that referenced this issue Jul 14, 2013
@weierophinney weierophinney Merge branch 'hotfix/3871'
Close #3871
Fixes #3862
dfb4caa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.