Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!7663
3083926 - required error when default image is set - error fixed by ANANDT846
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
3083926 - required error when default image is set - error fixed by ANANDT846
issue/drupal-3083926:3083926-default-image-and
into
11.x
Overview
0
Commits
1
Pipelines
3
Changes
1
Open
Anand Tiwari
requested to merge
issue/drupal-3083926:3083926-default-image-and
into
11.x
10 months ago
Overview
0
Commits
1
Pipelines
3
Changes
1
Expand
Closes
#3083926
0
0
Merge request reports
Viewing commit
6e9dd6b0
Show latest version
1 file
+
5
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
6e9dd6b0
php standards fixed
· 6e9dd6b0
ANAND TIWARI
authored
10 months ago
core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
+
6
−
0
Options
@@ -201,6 +201,12 @@ protected function formMultipleElements(FieldItemListInterface $items, array &$f
];
}
foreach
(
$elements
as
$element_Index
=>
$element
)
{
if
(
empty
(
$element
[
'#default_value'
][
'fid'
])
&&
$element
[
'#default_image'
][
'fid'
])
{
$elements
[
$element_Index
][
'#default_value'
][
'fids'
][]
=
$element
[
'#default_image'
][
'fid'
];
}
}
return
$elements
;
}
Loading