You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 16, 2018. It is now read-only.
In Zend_Cache_Backend_TwoLevels on calling save() _getFastLifetime() is called without the 3th parameter $maxLifetime. $maxLifetime will default to null. Resulting in infinite lifetime no matter what $lifetime or $priority is given.
The reason; at line 504 "$maxLifetime >= 0" will be "null >= 0" and that will return true (in my php version atleast) therefor "return $maxLifetime;" will return the lifetime of null.
Confirmed, I just found this bug as well. The fix is easy though by changing >= to > as $maxLifetime only makes sense when it's greater than zero. Just opened a pull request.
Version: 1.12.10dev
Class: Zend_Cache_Backend_TwoLevels
Method: _getFastLifetime()
Line: 504
In Zend_Cache_Backend_TwoLevels on calling save() _getFastLifetime() is called without the 3th parameter $maxLifetime. $maxLifetime will default to null. Resulting in infinite lifetime no matter what $lifetime or $priority is given.
The reason; at line 504 "$maxLifetime >= 0" will be "null >= 0" and that will return true (in my php version atleast) therefor "return $maxLifetime;" will return the lifetime of null.
Isolated the code looks like this:
What I would expect is 1200. What I get is null.
The text was updated successfully, but these errors were encountered: