Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
a3c7ffae
Unverified
Commit
a3c7ffae
authored
Oct 19, 2016
by
Thomas Müller
Browse files
Ensure $commands being an array - fixes #26073
parent
d322d9b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/private/App/DependencyAnalyzer.php
View file @
a3c7ffae
...
...
@@ -196,6 +196,9 @@ class DependencyAnalyzer {
if
(
!
is_array
(
$commands
))
{
$commands
=
[
$commands
];
}
if
(
isset
(
$commands
[
'@value'
]))
{
$commands
=
[
$commands
];
}
$os
=
$this
->
platform
->
getOS
();
foreach
(
$commands
as
$command
)
{
if
(
isset
(
$command
[
'@attributes'
][
'os'
])
&&
$command
[
'@attributes'
][
'os'
]
!==
$os
)
{
...
...
tests/lib/App/DependencyAnalyzerTest.php
View file @
a3c7ffae
...
...
@@ -268,6 +268,7 @@ class DependencyAnalyzerTest extends TestCase {
[[],
[[
'@attributes'
=>
[
'os'
=>
'Windows'
],
'@value'
=>
'grepp'
]]],
// grep is known on all systems
[[],
'grep'
],
[[],
[
'@attributes'
=>
[
'os'
=>
'Linux'
],
'@value'
=>
'grep'
]],
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment