$status = $request->execute();
if ( !$status->isOK() ) {
- throw new SparqlException( "HTTP error: {$status->getWikiText()}" );
+ throw new SparqlException( 'HTTP error: ' . $status->getWikiText( false, false, 'en' ) );
}
$result = $request->getContent();
- \MediaWiki\suppressWarnings();
+ \Wikimedia\suppressWarnings();
$data = json_decode( $result, true );
- \MediaWiki\restoreWarnings();
+ \Wikimedia\restoreWarnings();
if ( $data === null || $data === false ) {
throw new SparqlException( "HTTP request failed, response:\n" .
substr( $result, 1024 ) );