Skip to content

Cache version in JSON cache file can be infinite decimal #65

Closed
@alexander-nitsche

Description

@alexander-nitsche

Depending on the PHP version used, the cache version encoding in a JSON cache file may result in 1.399999999999 instead of 1.4. This is due to the internal handling of floating point numbers. It might be best to add the cache version as a string, as this is safe with JSON encoding.

I have observed the wrong behavior in Debian 11, PHP 7.4.33 (cli) (built: Feb 14 2023 18:01:29) ( NTS ).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions