Don't rely on $element['fid']['#value'] when adding the fields

Created on 10 December 2012, about 12 years ago
Updated 27 February 2023, almost 2 years ago

In file_entity_inline_field_widget_process(), there's a condition that checks the $element['fid']['#value'] to determine whether or not a file has been uploaded. However, that value might not have been set depending on which order the process functions are being executed in. It's safer to rely on $element['#value']['fid'] instead, as it's always set if there's a file uploaded.

๐Ÿ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ธ๐Ÿ‡ชSweden olofbokedal Malmรถ

Live updates comments and jobs are added and updated live.
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