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
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3379110-2.patch | 764 bytes | alexdoma |
Issue fork commerce_file-3379110
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
alexdoma commentedComment #5
abhishek_gupta1 commented@TomTech, I have fixed the issue "Passing null to parameter #1 ($num) of type int|float to abs() is deprecated", created MR. please kindly review the MR
Comment #7
jsacksick commented