Last modified: 2010-01-12 07:24:51 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 T23583, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21583 - MagicWord::match function documentation is wrong
MagicWord::match function documentation is wrong
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Documentation (Other open bugs)
1.16.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-20 22:09 UTC by Sean Colombo
Modified: 2010-01-12 07:24 UTC (History)
1 user (show)

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


Attachments

Description Sean Colombo 2009-11-20 22:09:16 UTC
The current documentation on /phase3/includes/MagicWord.php's function match(...) says:
<code>
/**
 * Returns true if the text contains the word
 * @return bool
 */
</code>
But it doesn't return bool.  It uses a simple preg_match() and therefore returns the number of matches.  This isn't too bad if you have the code in front of you and know the behavior of preg_match() but screws up the doxygen documentation and is misleading.

See documentation here for preg_match: http://us2.php.net/manual/en/function.preg-match.php

(sorry that this is so small.. I haven't applied for commit access yet)
Comment 1 Sam Reed (reedy) 2009-11-20 22:29:00 UTC
r59300
Comment 2 Sam Reed (reedy) 2010-01-12 07:24:51 UTC
r60964

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


Navigation
Links