diff options
author | Reedy <reedy@wikimedia.org> | 2020-06-09 01:07:52 +0100 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2020-06-09 19:27:16 +0000 |
commit | 567e1bbb5daecb54e58b58b45ee9c9d28f52f195 (patch) | |
tree | 5a6ac0f27a9296d1f6fe8fd8a49b1a036d6e39e7 | |
parent | 416dd55228e2aac04ac45e5359ca7cb688673cf7 (diff) | |
download | mediawikicore-567e1bbb5daecb54e58b58b45ee9c9d28f52f195.tar.gz mediawikicore-567e1bbb5daecb54e58b58b45ee9c9d28f52f195.zip |
Hard deprecate wfIsBadImage()
Bug: T249459
Depends-On: Iec58118198864704b1860aeb630476391e3a2c23
Change-Id: I939ded72427adc973739e7b376ea85cbf4b3e258
-rw-r--r-- | includes/GlobalFunctions.php | 1 | ||||
-rw-r--r-- | tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 86c7cf73c44b..7f0c2bf36ab0 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2802,6 +2802,7 @@ function wfUnpack( $format, $data, $length = false ) { * @return bool */ function wfIsBadImage( $name, $contextTitle = false ) { + wfDeprecated( __FUNCTION__, '1.34' ); $services = MediaWikiServices::getInstance(); return $services->getBadFileLookup()->isBadFile( $name, $contextTitle ?: null ); } diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php index efae24dd0501..e5fb3894104c 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php @@ -42,6 +42,7 @@ class GlobalWithDBTest extends MediaWikiTestCase { // Enable messages from MediaWiki namespace MediaWikiServices::getInstance()->getMessageCache()->enable(); + $this->hideDeprecated( 'wfIsBadImage' ); $this->assertEquals( $expected, wfIsBadImage( $name, $title ) ); } } |