Merge "Use func_num_args() in MapCacheLRU::clear() for sanity"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 13 Jul 2018 20:29:11 +0000 (20:29 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 13 Jul 2018 20:29:11 +0000 (20:29 +0000)
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 {