From 776a943cce96464f342b9ecb8cafdc7a01f5f870 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Thu, 27 Sep 2007 17:33:59 +0000 Subject: [PATCH] (bug 11474) Fix unintentional fall-through in math error handling --- RELEASE-NOTES | 2 +- includes/Math.php | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index fcf9dab70e..1da6d9bcce 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -74,7 +74,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Fix namespace selection after submit of Special:Newpages * Make input form of Special:Newpages nicer for RTL wikis * (bug 11462) Fix typo in LanguageGetSpecialPageAliases hook name - +* (bug 11474) Fix unintentional fall-through in math error handling === API changes in 1.12 === diff --git a/includes/Math.php b/includes/Math.php index 2771d04cbb..cfed955443 100644 --- a/includes/Math.php +++ b/includes/Math.php @@ -111,10 +111,17 @@ class MathRenderer { } else { $errbit = htmlspecialchars( substr($contents, 1) ); switch( $retval ) { - case 'E': $errmsg = $this->_error( 'math_lexing_error', $errbit ); - case 'S': $errmsg = $this->_error( 'math_syntax_error', $errbit ); - case 'F': $errmsg = $this->_error( 'math_unknown_function', $errbit ); - default: $errmsg = $this->_error( 'math_unknown_error', $errbit ); + case 'E': + $errmsg = $this->_error( 'math_lexing_error', $errbit ); + break; + case 'S': + $errmsg = $this->_error( 'math_syntax_error', $errbit ); + break; + case 'F': + $errmsg = $this->_error( 'math_unknown_function', $errbit ); + break; + default: + $errmsg = $this->_error( 'math_unknown_error', $errbit ); } } -- 2.20.1