Handle failure to load content in Revision getSize, etc
authordaniel <daniel.kinzler@wikimedia.de>
Thu, 11 Jan 2018 12:40:53 +0000 (13:40 +0100)
committerdaniel <daniel.kinzler@wikimedia.de>
Thu, 11 Jan 2018 14:23:03 +0000 (15:23 +0100)
commit04bac0dee1c919c2f5c63527c90412b0b8fac081
tree330155aac67cb0ae15f0d8d4746415e3b3b5c323
parentfded33d6deb75ecd50eb5ba8f1bea03106474308
Handle failure to load content in Revision getSize, etc

The Revision class used to just return null if size or hsash were unknown
and could nto be determined. This patch restores this behavior by
catching any RevisionAccessExceptions raised by RevisionRecord when
failing to load content.

Bug: T184693
Bug: T184690
Change-Id: I393ea19b9fb48219583fc65ce81ea14d8d0a2357
includes/Revision.php
includes/Storage/RevisionArchiveRecord.php
includes/Storage/RevisionRecord.php
includes/Storage/RevisionStoreRecord.php
tests/phpunit/includes/RevisionTest.php