Error PHP74 - Trying to access array offset on value of type null

Although the configuration of my Nextcloud may be different, I have found that Scanning all files using the files:scan command in occ floods my Nextcloud log with a variant of this error. Seeing how the community could provide valuable information to any developers folowing this topic, it would be great if @Oriann updates the original post by providing the versions of the software used in his installation, to help reduce the number of these errors.

Here are the details of my installation:

Background:
The Nextcloud package is installed, using an archive file, on a shared hosting server with some folders connected to external storage.
Nextcloud version: 18.0.4, 18.0.6 => 18.0.7
Operating system and version: Ubuntu 18.04
Apache or nginx version: Apache 2.4.29
PHP version: 7.4.3

The issue you are facing: refer to the first paragraph of my post in this topic.

The output of your Nextcloud log in Admin > Logging:

[PHP Errors] – Trying to access array offset on value of type null at /home/ssh-user/domain.tld/nextcloud/3rdparty/aws/aws-sdk-php/src/RetryMiddleware.php#144

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

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

<?php
$CONFIG = array (
  'instanceid' => 'ocnssr8i2s5s',
  'passwordsalt' => 'unsalted',
  'secret' => 'notso',
  'trusted_domains' =>
  array (
    0 => 'domain.tld',
  ),
  'datadirectory' => '/home/ssh-user/domain.tld/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.7.1',
  'overwrite.cli.url' => 'https://domain.tld/nextcloud',
  'dbname' => 'honeysuckle_squirt',
  'dbhost' => 'mysql.server.sticky-hosting.com',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'meee',
  'dbpassword' => 'pass12345',
  'installed' => true,
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

N.B. Agree with @andyp that the errors persist when upgrading to PHP 7.4 from PHP 7.2, while using a point release following Nextcloud 17.0.1

Issues with deleting, moving, and renaming files - External storage

1 Like