Shares with me not working in NC 15 and php7.2

[details=“Support intro”]

After upgrading NC from 13 to 14 and then to 15, I realised that users can’t see the shares in the section ‘Shares with me’, however the shares can be retrieved from links in the activity panel and the information is kept in the oc_shares table in MySQL. I execute every recommendation for occ command in each upgrade. Right now I don’t have any warnings regarding configuration in NC15.
/details]

Nextcloud version ( 15.0.2):
Operating system and version (Debian Stretch):
Apache or nginx version (Apache 2.4.25):
PHP version (7.2):

The issue you are facing:

Is this the first time you’ve seen this error?: Y

Steps to replicate it:

  1. Upgrade NC13 to NC14
  2. Upgrade NC14 to NC15

The output of your Nextcloud log in Admin > Logging:

[PHP] Error: Error: Call to a member function getPath() on null at /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php#182

GET /ocs/v1.php/apps/files_sharing/api/v1/shares?format=json&shared_with_me=true&include_tags=true
from xxx.xxx.xxx.xxx by 1XXXXXXE-FXXA-4XXB-8XX0-1XXXXXXXX3 at 2019-01-23T12:28:30+00:00
[PHP] Error: Undefined offset: 0 at /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareAPIController.php#178

GET /ocs/v1.php/apps/files_sharing/api/v1/shares?format=json&shared_with_me=true&include_tags=true
from xxx.xxx.xxx.xxx by 1XXXXXXE-FXXA-4XXB-8XX0-1XXXXXXXX3 at 2019-01-23T12:28:30+00:00

The output of your config.php file in /var/www/nextcloud (make sure you remove any identifiable information!):

'instanceid' => '51f83835c6868',
  'passwordsalt' => 'xxxxxxx',
  'datadirectory' => '/xxxx/xxxxx',
  'dbtype' => 'mysql',
  'version' => '15.0.2.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'xxx.xxx.xxx.xxx',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxxxx',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'theme' => '',
  'maintenance' => false,
  'auth.bruteforce.protection.enabled' => false,
  'trusted_domains' =>
  array (
    0 => 'cloud.xxx.xxx',
    1 => 'xxx.xxx.xxx.xxx',
  ),
  'secret' => 'xxxx',
  'share_folder' => '/Shared',
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'xxxxx',
  'mail_domain' => 'xxxx.xx',
  'mail_smtphost' => 'xxx.xxx.xxx.xxx',
  'mail_smtpport' => 'xxx',
  'forcessl' => false,
  'forceSSLforSubdomains' => false,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'loglevel' => 2,
  'mail_smtpname' => 'xxxx',
  'mail_smtppassword' => 'xxxxxxx',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trashbin_retention_obligation' => 'auto',
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'overwrite.cli.url' => 'https://cloud.xxxx.xx',
  'trusted_proxies' =>
  array (
    0 => '10.x.x.x',
  ),
  'overwritehost' => 'cloud.xxxx.xx',
  'updater.release.channel' => 'stable',
  'mail_sendmailmode' => 'smtp',

The output of your Apache /log in /var/log/apache2/error.log:

[Wed Jan 23 06:25:09.255020 2019] [mpm_prefork:notice] [pid 22000] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2q configured -- resuming normal operations
[Wed Jan 23 06:25:09.255042 2019] [core:notice] [pid 22000] AH00094: Command line: '/usr/sbin/apache2'

In the database I can see the entries in oc_share and also clicking in activity I can get the contents of the shared resource with me, however it’s not possible from the main sidebar in share with me.