if ( $deprecationInfo ) {
$name = $this->getName();
$warning = 'This page is using the deprecated ResourceLoader module "' . $name . '".';
- if ( !is_bool( $deprecationInfo ) && isset( $deprecationInfo['message'] ) ) {
- $warning .= "\n" . $deprecationInfo['message'];
+ if ( is_string( $deprecationInfo ) ) {
+ $warning .= "\n" . $deprecationInfo;
}
return Xml::encodeJsCall(
'mw.log.warn',
*/
final protected function buildContent( ResourceLoaderContext $context ) {
$rl = $context->getResourceLoader();
- $stats = RequestContext::getMain()->getStats();
+ $stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
$statStart = microtime( true );
// Only include properties that are relevant to this context (e.g. only=scripts)