Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
bad499ba
Commit
bad499ba
authored
10 years ago
by
Morris Jobke
Browse files
Options
Downloads
Plain Diff
Merge pull request #17252 from owncloud/fix-php-errors-in-app-description
Only do the description kung-fu on strings
parents
709eca20
aae55174
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/app.php
+19
-15
19 additions, 15 deletions
lib/private/app.php
tests/lib/app.php
+4
-0
4 additions, 0 deletions
tests/lib/app.php
with
23 additions
and
15 deletions
lib/private/app.php
+
19
−
15
View file @
bad499ba
...
...
@@ -1223,6 +1223,7 @@ class OC_App {
// just modify the description if it is available
// otherwise this will create a $data element with an empty 'description'
if
(
isset
(
$data
[
'description'
]))
{
if
(
is_string
(
$data
[
'description'
]))
{
// sometimes the description contains line breaks and they are then also
// shown in this way in the app management which isn't wanted as HTML
// manages line breaks itself
...
...
@@ -1240,6 +1241,9 @@ class OC_App {
// join the single paragraphs with a empty line in between
$data
[
'description'
]
=
implode
(
"
\n\n
"
,
$result
);
}
else
{
$data
[
'description'
]
=
''
;
}
}
return
$data
;
...
...
This diff is collapsed.
Click to expand it.
tests/lib/app.php
+
4
−
0
View file @
bad499ba
...
...
@@ -510,6 +510,10 @@ class Test_App extends \Test\TestCase {
[
'not-a-description'
=>
"
\t
This is a multiline
\n
test with
\n
\t
some new lines "
],
[
'not-a-description'
=>
"
\t
This is a multiline
\n
test with
\n
\t
some new lines "
]
],
[
[
'description'
=>
[
100
,
'bla'
]],
[
'description'
=>
""
]
],
];
}
...
...
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