Closed maxchirkov closed 12 years ago
That method expects a parameter in one of the following formats:
I believe your use case can be solved by using one of these formats, instead of the seconds you wish to cache for.
Yes, but you have a condition that checks for numeric value and assumes that seconds are being provided. Of course, I avoided the issue by using your custom format, after I realized the issue with regular seconds.
Max Chirkov
On Thu, Jul 19, 2012 at 11:23 AM, Joshua Murray < reply@reply.github.com
wrote:
That method expects a parameter in one of the following formats:
- "1w" (One week)
- "2d" (Two days)
- "4h" (Four hours)
- "15m" (Fifteen minutes)
I believe your use case can be solved by using one of these formats, instead of the seconds you wish to cache for.
Reply to this email directly or view it on GitHub: https://github.com/sparkapi/sparkapi4p2/issues/9#issuecomment-7106594
You're right, they did make that assumption! Reopening
Code updated and merged! It was resolved with pull request from issue #12.
In Core.php on line #150:
actually removes last character from the $val variable and then the wrong value is returned in the condition below where $time = $val:
So, if I pass 10800 seconds (3 hours) to the method, I get 1080 back, which is only about 18 minutes.