Error
MediaWiki version: 1.35.0-wmf.11
PHP Notice: Undefined index: etag
MediaWiki version: 1.35.0-wmf.11
PHP Notice: Undefined index: etag
#0 /srv/mediawiki/php-1.35.0-wmf.11/extensions/VisualEditor/includes/ApiVisualEditor.php(630): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.35.0-wmf.11/includes/api/ApiMain.php(1603): ApiVisualEditor->execute()
#2 /srv/mediawiki/php-1.35.0-wmf.11/includes/api/ApiMain.php(539): ApiMain->executeAction()
#3 /srv/mediawiki/php-1.35.0-wmf.11/includes/api/ApiMain.php(510): ApiMain->executeActionWithErrorHandling()
#4 /srv/mediawiki/php-1.35.0-wmf.11/api.php(78): ApiMain->execute()
#5 /srv/mediawiki/w/api.php(3): require(string)
#6 {main}Change 558863 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/VisualEditor@master] Fix unchecked array access in ApiVisualEditor
Change 558863 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Fix unchecked array access in ApiVisualEditor
Change 559006 had a related patch set uploaded (by Jforrester; owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/VisualEditor@wmf/1.35.0-wmf.11] Fix unchecked array access in ApiVisualEditor
Change 559006 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.35.0-wmf.11] Fix unchecked array access in ApiVisualEditor
Mentioned in SAL (#wikimedia-operations) [2019-12-18T10:47:48Z] <jforrester@deploy1001> Synchronized php-1.35.0-wmf.11/extensions/VisualEditor/includes/ApiVisualEditor.php: T240961: Fix unchecked array access in ApiVisualEditor (duration: 01m 02s)
This probably only affected officewiki and other private wikis, where VisualEditor talks directly to Parsoid rather than RESTBase (and the variable name $restbaseHeaders is a bit of a misnomer). However, I thought that Parsoid also returns an ETag header on its responses. This might indicate a Parsoid bug. Your fix looks correct to me under the circumstances, thanks!