MultiWriteBagOStuff: require nonempty 'caches' param
authorOri Livneh <ori@wikimedia.org>
Mon, 21 Sep 2015 18:29:50 +0000 (11:29 -0700)
committerOri Livneh <ori@wikimedia.org>
Mon, 21 Sep 2015 18:34:15 +0000 (11:34 -0700)
commit481d5a322164cad7c2249cb1660e5e6afef4ba9c
tree7990caa9826ad141708611feb631f8d78a21eb44
parentd12e8edcc2f525aa289981c5d9cab677706f83fa
MultiWriteBagOStuff: require nonempty 'caches' param

MultiWriteBagOStuff::__construct() barfs if the 'caches' parameter is unset,
but it permits it to be an empty array. This means that subsequent operations
that need to reference the first (primary) cache backend need to check that
it is there at all.

Since there is not much sense in having a MultiWriteBagOStuff object with zero
cache backends, make the constructor require a nonempty array for 'caches', and
remove the subsequent checks that are made redundant by this new restriction.

Change-Id: I30f3e0dcbfe67570a368e64b8233cc0ba7f90b2f
includes/objectcache/MultiWriteBagOStuff.php