From 72738d6476eb9b489869ece281bf7036cb4e2932 Mon Sep 17 00:00:00 2001 From: addshore Date: Sun, 3 Apr 2016 12:24:00 +0300 Subject: [PATCH] Remove use of deprecated wfSuppress/RestoreWarnings Change-Id: I8f7a77a66f027d853c3532021a24425339571f7c --- includes/media/WebP.php | 8 ++++---- .../includes/debug/logger/monolog/AvroFormatterTest.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/media/WebP.php b/includes/media/WebP.php index 6a01e8781c..35e885f1ca 100644 --- a/includes/media/WebP.php +++ b/includes/media/WebP.php @@ -63,9 +63,9 @@ class WebPHandler extends BitmapHandler { return self::METADATA_GOOD; } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $data = unserialize( $metadata ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( !$data || !is_array( $data ) ) { wfDebug( __METHOD__ . " invalid WebP metadata\n" ); @@ -234,9 +234,9 @@ class WebPHandler extends BitmapHandler { $metadata = $file->getMetadata(); } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $metadata = unserialize( $metadata ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( $metadata == false ) { return false; diff --git a/tests/phpunit/includes/debug/logger/monolog/AvroFormatterTest.php b/tests/phpunit/includes/debug/logger/monolog/AvroFormatterTest.php index a9a1e7a123..938397ab1f 100644 --- a/tests/phpunit/includes/debug/logger/monolog/AvroFormatterTest.php +++ b/tests/phpunit/includes/debug/logger/monolog/AvroFormatterTest.php @@ -47,9 +47,9 @@ class AvroFormatterTest extends MediaWikiTestCase { // disable conversion of notices PHPUnit_Framework_Error_Notice::$enabled = false; // have to keep the user notice from being output - wfSuppressWarnings(); + \MediaWiki\suppressWarnings(); $res = $formatter->format( [ 'channel' => 'marty' ] ); - wfRestoreWarnings(); + \MediaWiki\restoreWarnings(); PHPUnit_Framework_Error_Notice::$enabled = $noticeEnabled; $this->assertNull( $res ); } -- 2.20.1