X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiErrorFormatter.php;h=183f7e2bb34ef470b2c93f830214b87aaaaa23d4;hp=7fb13525fa87ecbeba4dfddb6ff2912c892ef961;hb=a8379682a46a428320c88702c800a6107c015137;hpb=d19826aa35b206847a568a4b2c1c9ffaa615fca5 diff --git a/includes/api/ApiErrorFormatter.php b/includes/api/ApiErrorFormatter.php index 7fb13525fa..183f7e2bb3 100644 --- a/includes/api/ApiErrorFormatter.php +++ b/includes/api/ApiErrorFormatter.php @@ -160,6 +160,9 @@ class ApiErrorFormatter { if ( $exception instanceof ILocalizedException ) { $msg = $exception->getMessageObject(); $params = []; + } elseif ( $exception instanceof MessageSpecifier ) { + $msg = Message::newFromSpecifier( $exception ); + $params = []; } else { // Extract code and data from the exception, if applicable if ( $exception instanceof UsageException ) {