Fix unchecked array access in ApiVisualEditor

I'm not sure if this qualifies as an actual fix. I don't really know
what this code is supposed to do. Maybe the bad array access is a hint
for a completely different error somewhere else. All this patch really
does is silencing the bad array access.

This line of code was introduced with I1b35b28 in May already. Why does
it start failing now?

Bug: T240961
Change-Id: I5ec2dc453e5d8db5d2f9e49058eda001ed021d3d
This commit is contained in:
Thiemo Kreuz 2019-12-18 08:22:25 +01:00
parent 5a24e78616
commit 8e4dc67ec7

View file

@ -626,7 +626,7 @@ class ApiVisualEditor extends ApiBase {
'blockinfo' => $blockinfo,
'canEdit' => $canEdit,
];
if ( $restbaseHeaders ) {
if ( isset( $restbaseHeaders['etag'] ) ) {
$result['etag'] = $restbaseHeaders['etag'];
}
if ( isset( $params['badetag'] ) ) {