From cc95db5afdacd60fc4c900a55c67931d16e15364 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Wed, 19 Aug 2020 12:47:27 -0400 Subject: [PATCH] Ensure Parsoid doesn't throw when is used w/o Cite installed Parsoid always enables `` processing, but our Cite extension implementation tries to fetch $wgCiteResponsiveReferences, which won't be set if the Cite extension is not installed. Change-Id: Idde8af07e5bf40983b2ec878ebf70aabb522a800 (cherry picked from commit 0ca4ae6908b626d34f8445d9048342378d0e3c23) (cherry picked from commit 29d3e25b4a978c555cb0b21dbaa191b0715809d2) --- includes/VEParsoid/src/Config/SiteConfig.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/VEParsoid/src/Config/SiteConfig.php b/includes/VEParsoid/src/Config/SiteConfig.php index 6c950ecfdc..b3f33d49c1 100644 --- a/includes/VEParsoid/src/Config/SiteConfig.php +++ b/includes/VEParsoid/src/Config/SiteConfig.php @@ -396,7 +396,8 @@ class SiteConfig extends ISiteConfig { public function responsiveReferences(): array { // @todo This is from the Cite extension, which shouldn't be known about by core return [ - 'enabled' => $this->config->get( 'CiteResponsiveReferences' ), + 'enabled' => $this->config->has( 'CiteResponsiveReferences' ) ? + $this->config->get( 'CiteResponsiveReferences' ) : false, 'threshold' => 10, ]; }