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
!8616
Don't log for SVG
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Don't log for SVG
issue/drupal-3458267:3458267-stop-logging-for
into
11.x
Overview
0
Commits
1
Pipelines
1
Changes
1
Open
Igor Lima
requested to merge
issue/drupal-3458267:3458267-stop-logging-for
into
11.x
10 months ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Closes
#3458267
0
0
Merge request reports
Compare
11.x
11.x (HEAD)
and
latest version
latest version
647c49e4
1 commit,
10 months ago
1 file
+
9
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
core/modules/image/image.module
+
9
−
5
Options
@@ -106,11 +106,15 @@ function template_preprocess_image_style(&$variables): void {
// to override that if they need to.
$variables
[
'image'
][
'#access'
]
=
FALSE
;
// Inform the site builders why their image didn't work.
\Drupal
::
logger
(
'image'
)
->
warning
(
'Could not apply @style image style to @uri because the style does not support it.'
,
[
'@style'
=>
$style
->
label
(),
'@uri'
=>
$variables
[
'uri'
],
]);
// Don't log for svg files.
$ext
=
mb_strtolower
(
pathinfo
(
$variables
[
'uri'
],
PATHINFO_EXTENSION
));
if
(
$ext
!==
'svg'
)
{
// Inform the site builders why their image didn't work.
\Drupal
::
logger
(
'image'
)
->
warning
(
'Could not apply @style image style to @uri because the style does not support it.'
,
[
'@style'
=>
$style
->
label
(),
'@uri'
=>
$variables
[
'uri'
],
]);
}
}
if
(
\array_key_exists
(
'alt'
,
$variables
))
{
Loading