Deprecated function warning: Implicit conversion from float-string to int loses precision in DateTimePlus->__call()

Created on 26 August 2025, 2 months ago

Problem/Motivation

When using the relative_date_facets module, users are encountering PHP deprecation warnings in their logs. The warning message indicates that a float-string value is being implicitly converted to an integer, which causes precision loss.

Steps to reproduce

  1. Install and enable the relative_date_facets module
  2. Configure facets with relative date functionality
  3. Browse pages that utilize these facets
  4. Check the error logs

Proposed resolution

The issue appears to be related to how timestamp values are being passed to the DateTimePlus class. The float-string "1756128322.143" should be properly cast to an integer before being passed to methods that expect integer timestamps, or the precision should be handled appropriately if microseconds are needed.

Remaining tasks

User interface changes

None expected.

API changes

None expected.

Data model changes

None expected.

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada jinah2020

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024