Page MenuHomePhabricator

ApiStashEdit warning and notices
Closed, ResolvedPublic0 Story Points

Description

From 1.28.0-wmf.6

Warning: parseAndStash() expects exactly 4 parameters, 3 given in /srv/mediawiki/php-1.28.0-wmf.6/includes/api/ApiStashEdit.php on line 182
Notice: Undefined variable: summary in /srv/mediawiki/php-1.28.0-wmf.6/includes/api/ApiStashEdit.php on line 157
$ git log --oneline origin/wmf/1.28.0-wmf.5..origin/wmf/1.28.0-wmf.6 includes/api/ApiStashEdit.php

7898fd2 Perform edit stashing when the edit preview or diff form is requested
cb68ff0 Send the edit summary/user to the edit stash API
a74346b Add more logging info to parseAndStash() for uncacheable content
e40b678 Simplify ApiStashEdit::checkCache()
6f86660 Include title/user in some edit stash log messages
801db2a Merge "Reject authentication data change when there are warnings"

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 16 2016, 7:13 PM
hashar added a comment.EditedJun 16 2016, 7:21 PM

So looks like the stash edit accepts "summary" as a parameter (which is required by the function) but it is not defined as a parameter in getAllowedParams().

No idea how the API works, but I would expect it to silently discard the 'summary' key from the list of parameters, causing the executing function to spurt the warning.

EDIT: disregard the above. I have misread.

Change 294750 had a related patch set uploaded (by Aaron Schulz):
Pass empty summary to parseAndStash() to avoid warnings

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

hashar assigned this task to aaron.Jun 16 2016, 8:32 PM

Not much user impact, and it is an easy fix for VisualEditor backend code. Thank you Aaron!

Change 294833 had a related patch set uploaded (by Hashar):
Pass empty summary to parseAndStash() to avoid warnings

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

Change 294833 merged by jenkins-bot:
Pass empty summary to parseAndStash() to avoid warnings

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

Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.Jun 16 2016, 9:04 PM

Change 294840 had a related patch set uploaded (by Hashar):
Update VisualEditor

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

Change 294840 merged by Hashar:
Update VisualEditor

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

Change 294750 merged by jenkins-bot:
Pass empty summary to parseAndStash() to avoid warnings

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

Mentioned in SAL [2016-06-16T21:15:28Z] <hashar@tin> Synchronized php-1.28.0-wmf.6/extensions/VisualEditor/ApiVisualEditor.php: Pass empty summary to parseAndStash() to avoid warnings T137995 (duration: 00m 39s)

hashar closed this task as Resolved.Jun 16 2016, 9:16 PM

Error as disappeared from the logs. Thanks Aaron!

Jdforrester-WMF triaged this task as Normal priority.Jun 17 2016, 7:03 AM
Jdforrester-WMF set the point value for this task to 0.