getgrav / getgrav/grav-plugin-readingtime
Calculation of image view times problem.
- Dominant language
- PHP
- Stars
- 22
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I found a problem of image view time calculation in class of TwigReadingTimeFilters.php
A variable $seconds_short_count is over 60, when the value of both($seconds_short_count and $seconds_images) variable is large.
E.g. $seconds_short_count = 50 and $seconds_images = 50 :: $seconds_short_count += $seconds_images % 60; is $seconds_short_count =100.
Its rows 74 in TwigReadingTimeFilters.php.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open TwigReadingTimeFilters.php and inspect line 74, where $seconds_short_count is updated with $seconds_images. Reproduce the example values of 50 and 50, then verify that the calculation keeps the seconds value within the intended minute range when both inputs are large.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100