jenkins-bot has submitted this change and it was merged.

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
(cherry picked from commit d8e8c85a61b72e63c75ccbef02b5c8ca85f323f6)
---
M TemplateSandbox.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  MaxSem: Looks good to me, approved
  jenkins-bot: Verified



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/296675
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I034819cabe49ad0d353e9d95097af716062b3be7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateSandbox
Gerrit-Branch: wmf/1.28.0-wmf.8
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to