Reversion/followup to r59300 as per Tims comment
authorSam Reed <reedy@users.mediawiki.org>
Tue, 12 Jan 2010 07:24:25 +0000 (07:24 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Tue, 12 Jan 2010 07:24:25 +0000 (07:24 +0000)
includes/MagicWord.php

index f5ac889..632395d 100644 (file)
@@ -320,19 +320,19 @@ class MagicWord {
        }
 
        /**
-        * Returns the number of times the text contains the word
-        * @return int
+        * Returns true if the text contains the word
+        * @return bool
         */
        function match( $text ) {
-               return preg_match( $this->getRegex(), $text );
+               return (bool)preg_match( $this->getRegex(), $text );
        }
 
        /**
-        * Returns if the text starts with the word
-        * @return int
+        * Returns true if the text starts with the word
+        * @return bool
         */
        function matchStart( $text ) {
-               return preg_match( $this->getRegexStart(), $text );
+               return (bool)preg_match( $this->getRegexStart(), $text );
        }
 
        /**