Error PHP When I want share a file with Occ user

Hello,

I have a problem when i want to share a doc with an occ user.
In log I see that:

Error PHP Invalid argument supplied for foreach() at /var/www/owncloud/core/ajax/share.php#345

Can you help me?

thx

Server configuration

Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

Web server:

Package: apache2
State: installed
Automatically installed: yes
Version: 2.4.18-2ubuntu3.3
Architecture: amd64
Uncompressed Size: 501 k
Depends: lsb-base, procps, perl, mime-support, apache2-bin (= 2.4.18-2ubuntu3.3), apache2-utils (>= 2.4), apache2-data (= 2.4.18-2ubuntu3.3)
PreDepends: dpkg (>= 1.17.14)
Recommends: ssl-cert
Suggests: www-browser, apache2-doc, apache2-suexec-pristine | apache2-suexec-custom, ufw
Conflicts: apache2.2-bin, apache2.2-common, apache2:i386
Replaces: apache2.2-bin, apache2.2-common
Provides: httpd, httpd-cgi

Database:
Type: sqlite3

PHP version:
Version: 7.0.18

ownCloud version: (see ownCloud admin page)
ownCloud 9.1.6 (stable)

Updated from an older ownCloud or fresh install:

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

No errors have been found.

The content of config/config.php:

{
“system”: {
“updatechecker”: false,
“instanceid”: “ocrzo46s991b”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: {
“0”: “REMOVED SENSITIVE VALUE”,
“1”: “REMOVED SENSITIVE VALUE”,
“3”: “REMOVED SENSITIVE VALUE”,
“4”: “REMOVED SENSITIVE VALUE”,
“5”: “REMOVED SENSITIVE VALUE”,
},
“datadirectory”: “/var/www/owncloud/data”,
“overwrite.cli.url”: "http://“REMOVED SENSITIVE VALUE”,
“dbtype”: “sqlite3”,
“version”: “9.1.6.2”,
“logtimezone”: “UTC”,
“installed”: true,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “smtp”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“loglevel”: 0,
“appstore.experimental.enabled”: true,
“memcache.local”: “\OC\Memcache\APCu”,
“ldapIgnoreNamingRules”: false,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “487”,
“mail_smtpauthtype”: “LOGIN”,
“mail_smtpauth”: 1,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE
}
}


**List of activated apps:**

Enabled:
  - activity: 2.3.2
  - comments: 0.3.0
  - configreport: 0.1.1
  - contacts: 1.5.1
  - dav: 0.2.7
  - documents: 0.13.1
  - federatedfilesharing: 0.3.0
  - federation: 0.1.0
  - files: 1.5.1
  - files_antivirus: 0.9.0.0
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.10.0
  - files_texteditor: 2.1
  - files_trashbin: 0.9.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 15.0.0
  - notifications: 0.3.0
  - ojsxc: 3.1.1
  - ownnote: 1.08
  - passman: 2.1.0
  - provisioning_api: 0.5.0
  - serverinfo: 1.1.1.1
  - shorten: 0.0.15
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - updatenotification: 0.2.1
  - user_ldap: 0.9.0
Disabled:
  - encryption
  - external
  - files_external
  - news
  - onlyoffice
  - user_external

Updated from an older ownCloud or fresh install: fresh

I didn’t find anything about this error, please report at bugtracker:

Hello,

I’ve install nextcloud and this problem is solved!
Thx