We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a98b983 commit 8a36a9eCopy full SHA for 8a36a9e
src/AbstractCache.php
@@ -621,12 +621,14 @@ private static function parseDurationToSeconds(string $duration): int
621
if (isset($matches[3])) {
622
$seconds += ((int)$matches[3]) * 60; // minutes
623
}
624
+ $secondsPart = 0;
625
if (isset($matches[4])) {
- $seconds += ((int)$matches[4]); // seconds
626
+ $secondsPart += ((int)$matches[4]); // seconds
627
628
if ('m' === ($matches[5])) { // units in milliseconds
- $seconds *= 0.001;
629
+ $secondsPart *= 0.001;
630
631
+ $seconds += $secondsPart;
632
if ('-' === ($matches[1])) { // negative
633
$seconds *= -1;
634
0 commit comments