Skip to content

Traffic statistics is incorrect in case of no recent activity #3695

@xhruso00

Description

@xhruso00

Code of Conduct

Submission validity

  • This is not a personal support request, that should be posted on discussions community.
  • I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.

Self troubleshooting

Version

1.9.2

Description

Links are showing past days activity that is counted from last redirection date instead of counting it from current date.

Expectation

Last 7 days should show activity in last 7 days. Currently it shows last 7 days from last activity day.

Reproduction steps

No response

Context

Using PHP 8.2. I have attached picture where one can see that currently it is 29DEC23. Last activity date is 21DEC23 (from database). The included graph shows current date as 21DEC.

I assume "yourls_build_list_of_days" should fill empty dates with 0 up to current date, not just in between dates

Screenshot 2023-12-29 at 18 56 14

referrers: Array
(
)
referrer sort: Array
(
)
direct: 5
notdirect: 0
dates: Array
(
    [2023] => Array
        (
            [12] => Array
                (
                    [17] => 4
                    [21] => 1
                )

        )

)
list of days: Array
(
    [Dec 17, 2023] => 4
    [Dec 18, 2023] => 0
    [Dec 19, 2023] => 0
    [Dec 20, 2023] => 0
    [Dec 21, 2023] => 1
)
list_of_months: Array
(
    [12] => 12
)
list_of_years: Array
(
    [2023] => 2023
)
last_24h: Array
(
    [13 PM] => 0
    [14 PM] => 0
    [15 PM] => 0
    [16 PM] => 0
    [17 PM] => 0
    [18 PM] => 0
    [19 PM] => 0
    [20 PM] => 0
    [21 PM] => 0
    [22 PM] => 0
    [23 PM] => 0
    [00 AM] => 0
    [01 AM] => 0
    [02 AM] => 0
    [03 AM] => 0
    [04 AM] => 0
    [05 AM] => 0
    [06 AM] => 0
    [07 AM] => 0
    [08 AM] => 0
    [09 AM] => 0
    [10 AM] => 0
    [11 AM] => 0
    [12 PM] => 0
)
countries: Array
(
    [SK] => 5
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions