Fix fatal error in Wikibase.hooks.php

@todo use EntityRevision or something instead here.

Change-Id: Ieec6829da3a53bfcde3319fd6a6eb4465d2cac4b
Merge "Fix fatal error in Wikibase.hooks.php"