From: Bryan Tong Minh Date: Wed, 2 Feb 2011 15:44:42 +0000 (+0000) Subject: Follow-up r77640: Check whether there are errors before asking Status to transform... X-Git-Tag: 1.31.0-rc.0~32252 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=5622530d07bdb28c5ba2de8ef43bd2af10b9e1a5;p=lhc%2Fweb%2Fwiklou.git Follow-up r77640: Check whether there are errors before asking Status to transform them into wikitext. --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 8e3301d1f3..2472bc2d60 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -509,7 +509,11 @@ class HTMLForm { function getErrors( $errors ) { if ( $errors instanceof Status ) { global $wgOut; - $errorstr = $wgOut->parse( $errors->getWikiText() ); + if ( $errors->isOK() ) { + $errorstr = ''; + } else { + $errorstr = $wgOut->parse( $errors->getWikiText() ); + } } elseif ( is_array( $errors ) ) { $errorstr = $this->formatErrors( $errors ); } else {