diff options
author | Jürgen Kellerer <juergen@k123.eu> | 2020-01-26 21:33:16 +0300 |
---|---|---|
committer | Jürgen Kellerer <juergen@k123.eu> | 2020-01-26 21:58:19 +0300 |
commit | 631a6fc0c13ae3383b894539b8f681cd18a83535 (patch) | |
tree | d0680f14ec5e42e90767d10bf5b976088ebcd1a5 /lib/Db/IndexesRequestBuilder.php | |
parent | f8299a897d103bbc5a12e307942633c9a72f5db1 (diff) |
Resilience: Use TArrayTools::getArray() for setErrors()
Fixes: "TypeError: Argument 1 passed to OCA\FullTextSearch\Model\Index::setErrors() must be of the type array, null given, called in nextcloud/apps/fulltextsearch/lib/Db/IndexesRequestBuilder.php on line 125"
Signed-off-by: Jürgen Kellerer <juergen@k123.eu>
Diffstat (limited to 'lib/Db/IndexesRequestBuilder.php')
-rw-r--r-- | lib/Db/IndexesRequestBuilder.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Db/IndexesRequestBuilder.php b/lib/Db/IndexesRequestBuilder.php index 5b21a8f..3baeb44 100644 --- a/lib/Db/IndexesRequestBuilder.php +++ b/lib/Db/IndexesRequestBuilder.php @@ -122,7 +122,7 @@ class IndexesRequestBuilder extends CoreRequestBuilder { ->setLastIndex($this->getInt('indexed', $data, 0)); $index->setOptions($this->getArray('options', $data, [])); $index->setErrorCount($this->getInt('err', $data, 0)); - $index->setErrors(json_decode($data['message'], true)); + $index->setErrors($this->getArray('message', $data, [])); return $index; } |