diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-05-19 03:09:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 03:09:56 +0300 |
commit | d23897d22934df5a7e8b8cf5f1599ab59417f1ba (patch) | |
tree | 5ba5c7f0f6cc74c07c035f4611b6fb94533d4e28 | |
parent | 694354a73b4aabb52fb2f01acfc6c6e2ead2ef7c (diff) | |
parent | f60b807487517d3a641ae5532410e086d5c5a554 (diff) |
Merge pull request #504 from nextcloud/bugfix/noid/no-readline-without-optionsv1.2.7
accept --no-readline with empty options
-rw-r--r-- | lib/Command/Index.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Command/Index.php b/lib/Command/Index.php index 944f49d..04f738a 100644 --- a/lib/Command/Index.php +++ b/lib/Command/Index.php @@ -424,12 +424,11 @@ class Index extends ACommandBase { private function generateIndexOptions(InputInterface $input): IndexOptions { $jsonOptions = $input->getArgument('options'); - if (!is_string($jsonOptions)) { - return new IndexOptions([]); + $options = []; + if (is_string($jsonOptions)) { + $options = json_decode($jsonOptions, true); } - $options = json_decode($jsonOptions, true); - if (!is_array($options)) { $options = []; } |