https://bugzilla.wikimedia.org/show_bug.cgi?id=21583

           Summary: MagicWord::match function documentation is wrong
           Product: MediaWiki
           Version: 1.16-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Documentation
        AssignedTo: [email protected]
        ReportedBy: [email protected]


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)


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to