Skip to content

Commit

Permalink
Merge pull request #504 from nextcloud/bugfix/noid/no-readline-withou…
Browse files Browse the repository at this point in the history
…t-options

accept --no-readline with empty options
  • Loading branch information
ArtificialOwl authored May 19, 2019
2 parents 694354a + f60b807 commit d23897d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Command/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,11 @@ private function indexProvider(IFullTextSearchProvider $provider, IndexOptions $
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 = [];
}
Expand Down

0 comments on commit d23897d

Please sign in to comment.