Page MenuHomePhabricator

Title::getLatestRevID function documentation is incorrect
Closed, ResolvedPublic

Description

In Title.php in the getLatestRevID() function, the function documentation claims that it returns an int. However, it returns the result of a call to Database->selectField which will return false in a couple of cases, mainly, if the page doesn't exist.

The documentation for the function should be updated to say it returns a Boolean or an Int or the result of the selectField call should be checked and 0 returned if its false.


Version: 1.16.x
Severity: minor
URL: http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Title.php?view=markup

Details

Reference
bz20726

Event Timeline

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