Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gutenberg-3247743
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
gutenberg-3247743
Commits
bd41c0e1
Commit
bd41c0e1
authored
5 years ago
by
Marco Fernandes
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3063408
: Return empty strings instead of null.
parent
b19119fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Controller/MediaController.php
+4
-4
4 additions, 4 deletions
src/Controller/MediaController.php
with
4 additions
and
4 deletions
src/Controller/MediaController.php
+
4
−
4
View file @
bd41c0e1
...
...
@@ -69,15 +69,15 @@ class MediaController extends ControllerBase {
if
(
!
isset
(
$data
[
'title'
][
'raw'
]))
{
$data
[
'title'
]
=
[
'raw'
=>
$data
[
'title'
],
'rendered'
=>
$data
[
'title'
],
'raw'
=>
is_null
(
$data
[
'title'
])
?
''
:
$data
[
'title'
],
'rendered'
=>
is_null
(
$data
[
'title'
])
?
''
:
$data
[
'title'
],
];
}
if
(
!
isset
(
$data
[
'caption'
][
'raw'
]))
{
$data
[
'caption'
]
=
[
'raw'
=>
$data
[
'caption'
],
'rendered'
=>
$data
[
'caption'
],
'raw'
=>
is_null
(
$data
[
'caption'
])
?
''
:
$data
[
'caption'
],
'rendered'
=>
is_null
(
$data
[
'caption'
])
?
''
:
$data
[
'caption'
],
];
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment