summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2022-09-08 20:20:55 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2022-09-08 20:20:55 +0000
commit3a4dc82e47d0af30f95fa39d88b96f1d12bbe79e (patch)
tree53fc5eeee31415cf43a97b845f74c7b3d5449132
parentbce8808a4c96a1dc177bb6a9d4f7f149f7241864 (diff)
parent0c5a58f1f8424d7aaa4b37fd8801cf90b82b068a (diff)
Merge "Fix selser on html endpoints" into wmf/1.39.0-wmf.27wmf/1.39.0-wmf.27
-rw-r--r--includes/parser/Parsoid/HTMLTransform.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/includes/parser/Parsoid/HTMLTransform.php b/includes/parser/Parsoid/HTMLTransform.php
index 79d8fbb4dd00..71644e52b05c 100644
--- a/includes/parser/Parsoid/HTMLTransform.php
+++ b/includes/parser/Parsoid/HTMLTransform.php
@@ -436,12 +436,7 @@ class HTMLTransform {
* @throws HttpException
*/
private function getSelserData(): ?SelserData {
- if ( !$this->hasOriginalHtml() ) {
- // No original HTML, no selser.
- return null;
- }
-
- $oldhtml = $this->getOriginalHtml();
+ $oldhtml = $this->hasOriginalHtml() ? $this->getOriginalHtml() : null;
// As per https://www.mediawiki.org/wiki/Parsoid/API#v1_API_entry_points
// "Both it and the oldid parameter are needed for