\Drupal\Component\Utility\Bytes::toInt() - ensure $size is a number type

Created on 4 July 2020, over 4 years ago
Updated 6 April 2023, over 1 year ago

Problem/Motivation

\Drupal\Component\Utility\Bytes::toInt() passes a string value to round(). In PHP 8 this will trigger an error.

Proposed resolution

Cast the $size value to an integer or a float as appropriate.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

🐛 Bug report
Status

Fixed

Version

8.9 ⚰️

Component
Base 

Last updated about 9 hours ago

Created by

🇬🇧United Kingdom alexpott 🇪🇺🌍

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024