summaryrefslogtreecommitdiff
path: root/extensions/ParserFunctions/Expr.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/ParserFunctions/Expr.php')
-rw-r--r--extensions/ParserFunctions/Expr.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/extensions/ParserFunctions/Expr.php b/extensions/ParserFunctions/Expr.php
index ee646021..8597f1f7 100644
--- a/extensions/ParserFunctions/Expr.php
+++ b/extensions/ParserFunctions/Expr.php
@@ -47,8 +47,13 @@ define( 'EXPR_POW', 35 );
define( 'EXPR_PI', 36 );
class ExprError extends MWException {
+ /**
+ * @param $msg string
+ * @param $parameter string
+ */
public function __construct( $msg, $parameter = '' ) {
- $this->message = '<strong class="error">' . wfMsgForContent( "pfunc_expr_$msg", htmlspecialchars( $parameter ) ) . '</strong>';
+ $msg = wfMessage( "pfunc_expr_$msg", $parameter )->inContentLanguage()->escaped();
+ $this->message = '<strong class="error">' . $msg . '</strong>';
}
}
@@ -158,6 +163,7 @@ class ExprParser {
* http://montcs.bloomu.edu/~bobmon/Information/RPN/infix2rpn.shtml
* It's essentially the same as Dijkstra's shunting yard algorithm.
* @param $expr string
+ * @throws ExprError
* @return string
*/
function doExpression( $expr ) {