Anomie has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/296633

Change subject: API parameter might be null rather than an empty array
......................................................................

API parameter might be null rather than an empty array

Take that into account when processing the input.

Bug: T138979
Change-Id: I034819cabe49ad0d353e9d95097af716062b3be7
---
M TemplateSandbox.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateSandbox 
refs/changes/33/296633/1

diff --git a/TemplateSandbox.hooks.php b/TemplateSandbox.hooks.php
index 1f73288..14e43c7 100644
--- a/TemplateSandbox.hooks.php
+++ b/TemplateSandbox.hooks.php
@@ -348,7 +348,7 @@
                        'templatesandboxcontentformat' => null,
                ];
                $params = [
-                       'prefix' => $params['templatesandboxprefix'],
+                       'prefix' => $params['templatesandboxprefix'] ?: [],
                        'title' => $params['templatesandboxtitle'],
                        'text' => $params['templatesandboxtext'],
                        'contentmodel' => 
$params['templatesandboxcontentmodel'],

-- 
To view, visit https://gerrit.wikimedia.org/r/296633
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I034819cabe49ad0d353e9d95097af716062b3be7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to