Default user.editCount to 0 in the Edit schema

Otherwise it will fail to validate for anonymous users (getEditCount returns null)
as it is a required field

Change-Id: I3d438cfde172b2598955773c4c22fc2d4a502f16
This commit is contained in:
Alex Monk 2015-03-13 23:08:21 +00:00 committed by Alex Monk
parent f061205405
commit 1096e18a55

View file

@ -169,7 +169,7 @@ class WikiEditorHooks {
'page.ns' => $title->getNamespace(),
'page.revid' => $page->getRevision() && $page->getRevision()->getId(),
'user.id' => $user->getId(),
'user.editCount' => $user->getEditCount(),
'user.editCount' => $user->getEditCount() ?: 0,
'mediawiki.version' => $wgVersion
) + $data;