Revision: Handle all return values of Title::newFromId
authorSam Smith <me@samsmith.io>
Wed, 27 Dec 2017 14:17:04 +0000 (14:17 +0000)
committerSam Smith <me@samsmith.io>
Sun, 31 Dec 2017 20:44:18 +0000 (20:44 +0000)
commit011b458627db0c6832a7b8ef98b5fc87868ab82a
tree600d6c037fd5a2d0fa2669323d5064ba5abbaf69
parent8eaee6fd06d9089ef90032530af9a9d25a52a1fc
Revision: Handle all return values of Title::newFromId

In Revision::getKnownCurrent, fail early when Title::newFromId returns
null to avoid an uncatchable fatal error being triggered.

RevisionStore#getKnownCurrentRevision requires that the title parameter
be an instance of Title.

This follows on from Ia4c20a91.

Change-Id: I9bddafcc5df630d1dff1e2526194186cab7097e5
includes/Revision.php
tests/phpunit/includes/RevisionDbTestBase.php