File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -329,9 +329,17 @@ private function convertFloatSecondsToMilliseconds($interval)
329329 }
330330
331331 $ maxValue = (int ) (\PHP_INT_MAX / 1000 );
332- $ intInterval = (int ) $ interval ;
332+ $ intervalOverflow = false ;
333+ if (PHP_VERSION_ID > 80499 && $ interval >= \PHP_INT_MAX + 1 ) {
334+ $ intervalOverflow = true ;
335+ } else {
336+ $ intInterval = (int ) $ interval ;
337+ if (($ intInterval <= 0 && $ interval > 1 ) || $ intInterval >= $ maxValue ) {
338+ $ intervalOverflow = true ;
339+ }
340+ }
333341
334- if (( $ intInterval <= 0 && $ interval > 1 ) || $ intInterval >= $ maxValue ) {
342+ if ($ intervalOverflow ) {
335343 throw new \InvalidArgumentException (
336344 "Interval overflow, value must be lower than ' {$ maxValue }', but ' {$ interval }' passed. "
337345 );
You can’t perform that action at this time.
0 commit comments