Permalink
Browse files

fixed bug with computeTTL() and null $ttl

  • Loading branch information...
1 parent 0d2745b commit 078a0f80d0ab915c6c10253bc4b373dbc22d2266 @maximebf committed May 3, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/CacheCache/Cache.php
@@ -123,6 +123,9 @@ public function getTTLVariation()
public function computeTTL($ttl = null)
{
$ttl = $ttl ?: $this->defaultTTL;
+ if ($ttl === null) {
+ return null;
+ }
return $ttl + rand(0, $this->ttlVariation);
}

0 comments on commit 078a0f8

Please sign in to comment.