--- /dev/null
+{
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "suggest": {
+ "ext-fileinfo": "*",
+ "ext-mbstring": "*",
+ "ext-wikidiff2": "*",
+ "ext-apc": "*"
+ }
+}
+++ /dev/null
-{
- "name": "mediawiki/core",
- "description": "Free software wiki application developed by the Wikimedia Foundation and others",
- "keywords": ["mediawiki", "wiki"],
- "homepage": "https://www.mediawiki.org/",
- "authors": [
- {
- "name": "MediaWiki Community",
- "homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits"
- }
- ],
- "license": "GPL-2.0",
- "support": {
- "issues": "https://bugzilla.wikimedia.org/",
- "irc": "irc://irc.freenode.net/mediawiki",
- "wiki": "https://www.mediawiki.org/"
- },
- "require": {
- "php": ">=5.3.2"
- },
- "require-dev": {
- "phpunit/phpunit": "*"
- },
- "suggest": {
- "ext-fileinfo": "*",
- "ext-mbstring": "*",
- "ext-wikidiff2": "*",
- "ext-apc": "*"
- }
-}
global $wgShowExceptionDetails;
if ( $wgShowExceptionDetails ) {
- return '<p>' . nl2br( htmlspecialchars( $this->getMessage() ) ) .
+ return '<p>' . nl2br( htmlspecialchars( MWExceptionHandler::getLogMessage( $this ) ) ) .
'</p><p>Backtrace:</p><p>' . nl2br( htmlspecialchars( MWExceptionHandler::getRedactedTraceAsString( $this ) ) ) .
"</p>\n";
} else {
global $wgShowExceptionDetails;
if ( $wgShowExceptionDetails ) {
- return $this->getMessage() .
+ return MWExceptionHandler::getLogMessage( $this ) .
"\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $this ) . "\n";
} else {
return "Set \$wgShowExceptionDetails = true; " .
get_class( $e ) . "\"";
if ( $wgShowExceptionDetails ) {
- $message .= "\nexception '" . get_class( $e ) . "' in " .
- $e->getFile() . ":" . $e->getLine() . "\nStack trace:\n" .
+ $message .= "\n" . MWExceptionHandler::getLogMessage( $e ) . "\nBacktrace:\n" .
self::getRedactedTraceAsString( $e ) . "\n";
}
'crh' => 'qırımtatarca', # Crimean Tatar (multiple scripts - defaults to Latin)
'crh-latn' => "qırımtatarca (Latin)\xE2\x80\x8E", # Crimean Tatar (Latin)
'crh-cyrl' => "къырымтатарджа (Кирилл)\xE2\x80\x8E", # Crimean Tatar (Cyrillic)
- 'cs' => 'česky', # Czech
+ 'cs' => 'čeština', # Czech
'csb' => 'kaszëbsczi', # Cassubian
'cu' => 'словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ', # Old Church Slavonic (ancient language)
'cv' => 'Чӑвашла', # Chuvash
* @covers MWExceptionHandler::getRedactedTrace
*/
function testGetRedactedTrace() {
+ $refvar = 'value';
try {
$array = array( 'a', 'b' );
$object = new StdClass();
- self::helperThrowAnException( $array, $object );
+ self::helperThrowAnException( $array, $object, $refvar );
} catch (Exception $e) {
}
$this->assertNotInternalType( 'object', $arg);
}
}
+
+ $this->assertEquals( 'value', $refvar, 'Ensuring reference variable wasn\'t changed' );
}
/**
* Helper function for testExpandArgumentsInCall
*
- * Pass it an object and an array :-)
+ * Pass it an object and an array, and something by reference :-)
*
* @throws Exception
*/
- protected static function helperThrowAnException( $a, $b ) {
+ protected static function helperThrowAnException( $a, $b, &$c ) {
throw new Exception();
}
}