Remove use of MWException in MapCacheLRU
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 22 Sep 2017 15:38:46 +0000 (17:38 +0200)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 22 Sep 2017 15:38:46 +0000 (17:38 +0200)
Change-Id: I830555ffcb1b50bdc54e552daa469e2c5e00611d

includes/libs/MapCacheLRU.php

index db6869b..c92769f 100644 (file)
@@ -76,7 +76,8 @@ class MapCacheLRU {
         */
        public function has( $key ) {
                if ( !is_int( $key ) && !is_string( $key ) ) {
-                       throw new MWException( __METHOD__ . ' called with invalid key. Must be string or integer.' );
+                       throw new UnexpectedValueException(
+                               __METHOD__ . ' called with invalid key. Must be string or integer.' );
                }
                return array_key_exists( $key, $this->cache );
        }