Merge "Added a separate error message for mkdir failures"
[lhc/web/wiklou.git] / includes / libs / objectcache / HashBagOStuff.php
index e03cec6..baa3c32 100644 (file)
@@ -20,7 +20,6 @@
  * @file
  * @ingroup Cache
  */
-use Wikimedia\Assert\Assert;
 
 /**
  * Simple store for keeping values in an associative array for the current process.
@@ -46,7 +45,9 @@ class HashBagOStuff extends BagOStuff {
                parent::__construct( $params );
 
                $this->maxCacheKeys = isset( $params['maxKeys'] ) ? $params['maxKeys'] : INF;
-               Assert::parameter( $this->maxCacheKeys > 0, 'maxKeys', 'must be above zero' );
+               if ( $this->maxCacheKeys <= 0 ) {
+                       throw new InvalidArgumentException( '$maxKeys parameter must be above zero' );
+               }
        }
 
        protected function expire( $key ) {