Use func_num_args() in MapCacheLRU::clear() for sanity
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 13 Jul 2018 14:15:52 +0000 (15:15 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 13 Jul 2018 14:15:52 +0000 (15:15 +0100)
Change-Id: Ie11e18a342db0176271e4d08f56a99b0e3caacbe

includes/libs/MapCacheLRU.php

index 595dc1a..e891c9e 100644 (file)
@@ -251,7 +251,7 @@ class MapCacheLRU implements IExpiringStore, Serializable {
         * @return void
         */
        public function clear( $keys = null ) {
-               if ( $keys === null ) {
+               if ( func_num_args() == 0 ) {
                        $this->cache = [];
                        $this->timestamps = [];
                } else {