From 3dab0f83394aa3a0df48dc2e89445eb61fb9eccb Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Fri, 26 Jun 2020 16:33:32 +0100 Subject: [PATCH] Follow-up I238632e: Allow etag to be null Change-Id: I45fec02c3d3560ac10d179e59e75cb5f8210ba14 --- includes/ApiParsoidTrait.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/ApiParsoidTrait.php b/includes/ApiParsoidTrait.php index 5ddc12aa57..004a1e23c4 100644 --- a/includes/ApiParsoidTrait.php +++ b/includes/ApiParsoidTrait.php @@ -234,11 +234,11 @@ trait ApiParsoidTrait { * @param Title $title The title of the page * @param array $data An array of the HTML and the 'scrub_wikitext' option * @param array $parserParams Parsoid parser parameters to pass in - * @param string $etag The ETag to set in the HTTP request header + * @param string|null $etag The ETag to set in the HTTP request header * @return string Body of the RESTbase server's response */ protected function postData( - string $path, Title $title, array $data, array $parserParams, string $etag + string $path, Title $title, array $data, array $parserParams, ?string $etag ) : string { $path .= urlencode( $title->getPrefixedDBkey() ); if ( isset( $parserParams['oldid'] ) && $parserParams['oldid'] ) { @@ -274,11 +274,11 @@ trait ApiParsoidTrait { * @param Title $title The title of the page * @param string $html The HTML of the page to be transformed * @param array $parserParams Parsoid parser parameters to pass in - * @param string $etag The ETag to set in the HTTP request header + * @param string|null $etag The ETag to set in the HTTP request header * @return string Body of the RESTbase server's response */ protected function postHTML( - Title $title, string $html, array $parserParams, string $etag + Title $title, string $html, array $parserParams, ?string $etag ) : string { return $this->postData( 'transform/html/to/wikitext/', $title,