projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Security update for Core, with self-updated composer
[yaffs-website]
/
vendor
/
symfony
/
console
/
Input
/
ArrayInput.php
diff --git
a/vendor/symfony/console/Input/ArrayInput.php
b/vendor/symfony/console/Input/ArrayInput.php
index af4c204bba30a163940bfbf46333e3932d614a2b..a44b6b2815cbdbc902ba9e2516f8b5579607c2f0 100644
(file)
--- a/
vendor/symfony/console/Input/ArrayInput.php
+++ b/
vendor/symfony/console/Input/ArrayInput.php
@@
-57,7
+57,7
@@
class ArrayInput extends Input
/**
* {@inheritdoc}
*/
/**
* {@inheritdoc}
*/
- public function hasParameterOption($values)
+ public function hasParameterOption($values
, $onlyParams = false
)
{
$values = (array) $values;
{
$values = (array) $values;
@@
-66,6
+66,10
@@
class ArrayInput extends Input
$v = $k;
}
$v = $k;
}
+ if ($onlyParams && $v === '--') {
+ return false;
+ }
+
if (in_array($v, $values)) {
return true;
}
if (in_array($v, $values)) {
return true;
}
@@
-77,11
+81,15
@@
class ArrayInput extends Input
/**
* {@inheritdoc}
*/
/**
* {@inheritdoc}
*/
- public function getParameterOption($values, $default = false)
+ public function getParameterOption($values, $default = false
, $onlyParams = false
)
{
$values = (array) $values;
foreach ($this->parameters as $k => $v) {
{
$values = (array) $values;
foreach ($this->parameters as $k => $v) {
+ if ($onlyParams && ($k === '--' || (is_int($k) && $v === '--'))) {
+ return false;
+ }
+
if (is_int($k)) {
if (in_array($v, $values)) {
return true;
if (is_int($k)) {
if (in_array($v, $values)) {
return true;
@@
-119,6
+127,9
@@
class ArrayInput extends Input
protected function parse()
{
foreach ($this->parameters as $key => $value) {
protected function parse()
{
foreach ($this->parameters as $key => $value) {
+ if ($key === '--') {
+ return;
+ }
if (0 === strpos($key, '--')) {
$this->addLongOption(substr($key, 2), $value);
} elseif ('-' === $key[0]) {
if (0 === strpos($key, '--')) {
$this->addLongOption(substr($key, 2), $value);
} elseif ('-' === $key[0]) {