37 [
false,
null,
null,
null ],
40 [
false,
null,
true,
null ],
41 [
false,
null,
null,
true ],
48 ->disableOriginalConstructor()
105 $json = MWExceptionHandler::jsonSerializeException(
109 "The $exception_class exception should be JSON serializable, got false." );
114 [ Exception::class ],
115 [ MWException::class ],
130 # Make sure we log a backtrace:
131 $this->
setMwGlobals( [
'wgLogExceptionBacktrace' =>
true ] );
134 MWExceptionHandler::jsonSerializeException(
new $exClass() )
137 "JSON serialized exception is missing key '$key'"
140 "JSON serialized key '$key' has type " . gettype( $json->$key )
141 .
" (expected: $expectedKeyType)."
150 foreach ( [ Exception::class, MWException::class ] as $exClass ) {
157 # Backtrace only enabled with wgLogExceptionBacktrace = true
172 $this->
setMwGlobals( [
'wgLogExceptionBacktrace' =>
true ] );
174 MWExceptionHandler::jsonSerializeException(
new Exception() )
186 $this->
setMwGlobals( [
'wgLogExceptionBacktrace' =>
false ] );
188 MWExceptionHandler::jsonSerializeException(
new Exception() )
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
global $wgCommandLineMode
foreach( $wgExtensionFunctions as $func) if(!defined('MW_NO_SESSION') &&! $wgCommandLineMode) if(! $wgCommandLineMode) $wgFullyInitialised
testisCommandLine( $expected, $wgCommandLineMode)
provideIsCommandLine MWException::isCommandLine
provideTextUseOutputPage()
testMwexceptionThrowing()
MWException MWException.
testUseMessageCache( $expected, $langObj)
provideUseMessageCache MWException::useMessageCache
static provideIsCommandLine()
testJsonserializeexceptionBacktracingEnabled()
Given wgLogExceptionBacktrace is true then serialized exception SHOULD have a backtrace.
testIsLogable()
MWException::isLoggable.
static provideJsonSerializedKeys()
Returns test cases: exception class, key name, gettype()
testJsonserializeexceptionBacktracingDisabled()
Given wgLogExceptionBacktrace is false then serialized exception SHOULD NOT have a backtrace.
testJsonserializeexceptionKeys( $expectedKeyType, $exClass, $key)
Lame JSON schema validation.
static provideExceptionClasses()
testUseOutputPage( $expected, $langObj, $wgFullyInitialised, $wgOut)
provideTextUseOutputPage MWException::useOutputPage
testJsonSerializeExceptions( $exception_class)
Verify the exception classes are JSON serializabe.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
returning false will NOT prevent logging $e