Merge "Don't log missing ETags when creating a new page, that's normal"

This commit is contained in:
jenkins-bot 2019-10-24 20:05:53 +00:00 committed by Gerrit Code Review
commit a249a7b69b

View file

@ -280,7 +280,8 @@ class ApiVisualEditorEdit extends ApiVisualEditor {
$path .= '/' . $parserParams['oldid']; $path .= '/' . $parserParams['oldid'];
} }
// Adapted from RESTBase mwUtil.parseETag() // Adapted from RESTBase mwUtil.parseETag()
if ( !preg_match( '/ // ETag is not expected when creating a new page (oldid=0)
if ( isset( $parserParams['oldid'] ) && $parserParams['oldid'] && !preg_match( '/
^(?:W\\/)?"? ^(?:W\\/)?"?
([^"\\/]+) ([^"\\/]+)
(?:\\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})) (?:\\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}))