From: Sam Reed Date: Tue, 12 Jan 2010 07:24:25 +0000 (+0000) Subject: Reversion/followup to r59300 as per Tims comment X-Git-Tag: 1.31.0-rc.0~38307 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=14919d77603821b46c21062e034aae0ffb20a29a;p=lhc%2Fweb%2Fwiklou.git Reversion/followup to r59300 as per Tims comment --- diff --git a/includes/MagicWord.php b/includes/MagicWord.php index f5ac8890a0..632395d58a 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -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 ); } /**