Passing null to parameter #1 ($num) of type int|float to abs() is deprecated

Created on 3 August 2023, 11 months ago
Updated 17 January 2024, 5 months ago

Problem/Motivation

The file_managed.filesize column could be null, if the file size couldn't be determined. So we need to check that the file size is not null before passing to format_size(), which expects an integer.

in web\modules\contrib\commerce_file\commerce_file.module
$variables['file_size'] = format_size($file->getSize());

Steps to reproduce

Proposed resolution

https://www.drupal.org/project/drupal/issues/3261229 ๐Ÿ› Passing null to parameter #1 ($num) of type int|float to abs() is deprecated Fixed

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Needs review

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡พBelarus alexdoma

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024