Aude has uploaded a new change for review.
https://gerrit.wikimedia.org/r/91654
Change subject: Fix undefined variable in Status::getMessage()
......................................................................
Fix undefined variable in Status::getMessage()
If $shortContext and $longContext are false, and there
are errors, then $s is undefined.
Change-Id: Ie07f80b43a48a6fc4ed28b2c519f51fd32690bc8
---
M includes/Status.php
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/54/91654/1
diff --git a/includes/Status.php b/includes/Status.php
index ab24201..15c8ce5 100644
--- a/includes/Status.php
+++ b/includes/Status.php
@@ -233,13 +233,13 @@
$s = wfMessage( $shortContext, $s );
} elseif ( $longContext ) {
$wrapper = new RawMessage( "* \$1\n" );
- $wrapper->params( $s )->parse();
+ $s = $wrapper->params( $s )->parse();
$s = wfMessage( $longContext, $wrapper );
}
} else {
$msgs = $this->getErrorMessageArray( $this->errors );
- $wrapper = new RawMessage( '* $' . implode( "\n* \$",
range( 1, count( $msgs ) + 1 ) ) );
- $wrapper->params( $msgs )->parse();
+ $wrapper = new RawMessage( '* $' . implode( "\n* \$",
range( 1, count( $msgs ) ) ) );
+ $s = $wrapper->params( $msgs )->parse();
if ( $longContext ) {
$s = wfMessage( $longContext, $wrapper );
@@ -249,6 +249,7 @@
$s = wfMessage( $shortContext, $wrapper );
}
}
+
return $s;
}
--
To view, visit https://gerrit.wikimedia.org/r/91654
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie07f80b43a48a6fc4ed28b2c519f51fd32690bc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits