Page MenuHomePhabricator

Database::update() should return the result
Closed, ResolvedPublic

Description

Author: thomas.dalton

Description:
at return statement to Database::update()

Database::update() should return the result of the query (true for success, false for failure), but doesn't. This patch fixes that (just the addition of one word).


Version: unspecified
Severity: enhancement

Attached:

Details

Reference
bz10769

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:49 PM
bzimport set Reference to bz10769.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

Note that the boolean alone won't be enough to determine whether or not rows were updated at all; database errors tend to throw exceptions, which should be caught, or passed up, but the more useful check is to call Database::affectedRows().