MessageCache: Restore 'loadedLanguages' tracking for load()
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 29 Jul 2019 18:22:10 +0000 (19:22 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 29 Jul 2019 18:22:10 +0000 (19:22 +0100)
commita5c984cc5978f869516e8a0c4892e8113d1c139f
tree5ab35e52dec5f775f4ba7390d2b396bb56526ea3
parent4d26b1b8427afff47bc3b62bf38e103f39126ff6
MessageCache: Restore 'loadedLanguages' tracking for load()

This was removed in 97e86d934b3 in 2018 in favour of using
`$this->cache->has($code)`. This is a problem because there
are cases where only a narrow subset of that structure is
populated (by MessageCache->replace) without things like
$this->overridable (or anything else that MessageCache->load does)
having ocurred yet.

The assumption that keys are only added to $this->cache by
MessageCache->load (or after that method has been called) was
actually true at some point. But, this changed in 2017 when
commit c962b480568e optimised MessageCache->replace to not call
MessageCache->load.

Bug: T208897
Change-Id: Ie8bb4a4793675e5f1454e65c427f3100035c8b4d
includes/cache/MessageCache.php