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

Change subject: Fix notice caused by not passing the WebRequest object by 
reference
......................................................................


Fix notice caused by not passing the WebRequest object by reference

It makes no sense that we should have to pass this by reference but
if we don't do it, we get a PHP notice.

Bug: 52466
Change-Id: Ibc8e33c4776a325cd32b6526dacc200994a73f7f
---
M ApiVisualEditor.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 9a4e4ce..c6ba537 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -252,7 +252,8 @@
                                // HACK: Build a fake EditPage so we can get 
checkboxes from it
                                $article = new Article( $page ); // 
Deliberately omitting ,0 so oldid comes from request
                                $ep = new EditPage( $article );
-                               $ep->importFormData( $this->getRequest() );
+                               $req = $this->getRequest();
+                               $ep->importFormData( $req ); // By reference 
for some reason (bug 52466)
                                $tabindex = 0;
                                $states = array( 'minor' => false, 'watch' => 
false );
                                $checkboxes = $ep->getCheckboxes( $tabindex, 
$states );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc8e33c4776a325cd32b6526dacc200994a73f7f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to