PHP 8.2, deprecated dynamic property, filesize

Created on 19 October 2023, about 1 year ago
Updated 8 December 2023, about 1 year ago

Problem/Motivation

PHP 8.2 deprecates the use of dynamically defined properties. Drupal\file\FileInterface::$filesize does not (and cannot) exist, as interfaces cannot define properties; however, there are setter and accessor methods available.

Steps to reproduce

Found via static analysis; however, should be reproducible uploading a file (such that it's initially a "temporary" file) larger than the configured maximum dimensions.

Proposed resolution

Make use of the setter provided by the interface instead of attempting to set the property directly.

Remaining tasks

Patch.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Widget plugins

Created by

πŸ‡¨πŸ‡¦Canada adam-vessey PE, Canada

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

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

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024