diff options
author | Daimona Eaytoy <daimona.wiki@gmail.com> | 2023-06-10 02:29:51 +0200 |
---|---|---|
committer | DannyS712 <dannys712.wiki@gmail.com> | 2024-01-19 22:01:12 +0000 |
commit | 2520f3d1c4054f4e2e19fd8a0ccd3792cc9772c9 (patch) | |
tree | 104082c2cab908d5cd25ff7198987a36e988fb11 /includes/StubObject | |
parent | 1d6776fdbccf956e1ce4747a9c39dd8a05cdea88 (diff) | |
download | mediawikicore-2520f3d1c4054f4e2e19fd8a0ccd3792cc9772c9.tar.gz mediawikicore-2520f3d1c4054f4e2e19fd8a0ccd3792cc9772c9.zip |
Replace more usages of deprecated MWException
Bug: T328220
Change-Id: Ie9b56bcf5e962e275d80570cad98d676da505894
Diffstat (limited to 'includes/StubObject')
-rw-r--r-- | includes/StubObject/StubObject.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/StubObject/StubObject.php b/includes/StubObject/StubObject.php index c5c9fe40b966..b96a82934499 100644 --- a/includes/StubObject/StubObject.php +++ b/includes/StubObject/StubObject.php @@ -26,7 +26,7 @@ namespace MediaWiki\StubObject; -use MWException; +use LogicException; use Wikimedia\ObjectFactory\ObjectFactory; /** @@ -211,7 +211,6 @@ class StubObject { * @param int $level Level to go in the stack trace to get the function * who called this function. * @return object The unstubbed version of itself - * @throws MWException */ // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore public function _unstub( $name = '_unstub', $level = 2 ) { @@ -224,7 +223,7 @@ class StubObject { if ( get_class( $GLOBALS[$this->global] ) != $this->class ) { $caller = wfGetCaller( $level ); if ( ++$recursionLevel > 2 ) { - throw new MWException( "Unstub loop detected on call of " + throw new LogicException( "Unstub loop detected on call of " . "\${$this->global}->$name from $caller\n" ); } wfDebug( "Unstubbing \${$this->global} on call of " |