widget: Remove outdated try/catch wrapper from SpinnerWidget

== What ==

This method was "Copied from OOUI\Tag", which no longer does this
since last year (I42c7a7b4d, 6e4e1a1796). Apply the same change here.

== Why now ==

Triggering E_USER_ERROR is deprecated in PHP 8.4+.

Bug: T381341
Bug: T379445
Change-Id: I1bac121caf746c30996dccd7fb95c4c240742951
(cherry picked from commit 751eca89fe473cc4a649e47dd54e9ab38f7c1957)
This commit is contained in:
Timo Tijhof 2025-06-11 20:58:36 -07:00 committed by Reedy
parent 37f529df85
commit f34ea0830a

View file

@ -2,7 +2,6 @@
namespace MediaWiki\Widget;
use Exception;
use MediaWiki\Html\Html;
use Stringable;
@ -64,10 +63,6 @@ class SpinnerWidget implements Stringable {
* @return string
*/
public function __toString() {
try {
return $this->toString();
} catch ( Exception $ex ) {
trigger_error( (string)$ex, E_USER_ERROR );
}
return $this->toString();
}
}