Skip to content

Implicit incompatible float to int conversion in Bits.php #10

@eltongo

Description

@eltongo

setTimestamp is called with a float, which has been deprecated as of PHP 8.1.

The problematic part of the code is this:

$date->setTimestamp(self::decodeBitsToInt($bitString, $start, $length) / 10);

Something like the following would fix it:

- $date->setTimestamp(self::decodeBitsToInt($bitString, $start, $length) / 10); 
+ $date->setTimestamp(intdiv(self::decodeBitsToInt($bitString, $start, $length), 10)); 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions