X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fwatcheditem%2FWatchedItemStore.php;h=c3630292fb64d2a38b12dd35e5cdd8c961ccec4e;hb=6cfb2e3d7a2b96d5041312fcec88248bb46573d7;hp=1a39945067941ac2f37da1c6c1ad96d8d7414008;hpb=3020d27638add607e9d86622652221c3729faf87;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/watcheditem/WatchedItemStore.php b/includes/watcheditem/WatchedItemStore.php index 1a39945067..c3630292fb 100644 --- a/includes/watcheditem/WatchedItemStore.php +++ b/includes/watcheditem/WatchedItemStore.php @@ -383,7 +383,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac /** * @param UserIdentity $user - * @param TitleValue[] $titles + * @param LinkTarget[] $titles * @return bool * @throws MWException */ @@ -1120,6 +1120,11 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac } $oldRev = $this->revisionLookup->getRevisionById( $oldid ); + if ( !$oldRev ) { + // Oldid given but does not exist (probably deleted) + return false; + } + $nextRev = $this->revisionLookup->getNextRevision( $oldRev ); if ( !$nextRev ) { // Oldid given and is the latest revision for this title; clear the timestamp.