Deprecated function: Implicit conversion from float 45.9 to int loses precision in _color_luminance()

Created on 10 October 2023, 9 months ago
Updated 29 November 2023, 7 months ago

Problem/Motivation

In Drupal 10.1.2 I keep getting this error notice,

Deprecated function: Implicit conversion from float 45.9 to int loses precision in _color_luminance() (line 893 of /home/public_html/themes/contrib/bootstrap_barrio/bootstrap_barrio.theme)

🐛 Bug report
Status

Closed: outdated

Version

5.5

Component

Code

Created by

🇳🇬Nigeria chike Nigeria

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

Comments & Activities

  • Issue created by @chike
  • Assigned to Shreya_98
  • Open on Drupal.org →
    Core: 10.1.0-alpha1 + Environment: PHP 7.4 & MySQL 5.7
    last update 9 months ago
    Waiting for branch to pass
  • @shreya_th opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review 9 months ago
  • 🇮🇳India Shreya_98

    Hi @hatuhay,
    I have fixed this issue i.e. Deprecated function: Implicit conversion from float 45.9 to int loses precision in _color_luminance() and also created MR for this. Kindly review the changes.

  • 🇳🇬Nigeria chike Nigeria

    Thanks @Shreya_th the MR fixed the error notices.

    One thing, I needed to fix the text color of my buttons as I was using a white text and d patch turned all button text dark color.

    I can't tell about the technicality of the code but the errors are gone.

    Thank you!

  • 🇵🇪Peru hatuhay Lima

    Percent is float, not integer and its input is under control, no oprion to receive string instead.

  • Status changed to Closed: outdated 7 months ago
Production build 0.69.0 2024