From 14919d77603821b46c21062e034aae0ffb20a29a Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 12 Jan 2010 07:24:25 +0000 Subject: [PATCH] Reversion/followup to r59300 as per Tims comment --- includes/MagicWord.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 ); } /** -- 2.20.1