Last modified: 2007-08-01 21:43:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12769, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10769 - Database::update() should return the result
Database::update() should return the result
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-01 21:37 UTC by Thomas "Tango" Dalton
Modified: 2007-08-01 21:43 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
at return statement to Database::update() (385 bytes, patch)
2007-08-01 21:37 UTC, Thomas "Tango" Dalton
Details

Description Thomas "Tango" Dalton 2007-08-01 21:37:51 UTC
Created attachment 3964 [details]
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).
Comment 1 Rob Church 2007-08-01 21:40:52 UTC
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().
Comment 2 Rob Church 2007-08-01 21:43:53 UTC
Fixed in r24532.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links