groupfolders icon indicating copy to clipboard operation
groupfolders copied to clipboard

Trying to access array offset on value of type null at ACLManager.php#119

Open ChristophWurst opened this issue 1 year ago โ€ข 6 comments

How to use GitHub

  • Please use the ๐Ÿ‘ reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. ?

Expected behaviour

?

Actual behaviour

image

ErrorException: Warning: Trying to access array offset on value of type null
#19 /groupfolders/lib/ACL/ACLManager.php(119): OCA\GroupFolders\ACL\ACLManager::getRelevantPaths
#18 /groupfolders/lib/ACL/ACLManager.php(149): OCA\GroupFolders\ACL\ACLManager::getACLPermissionsForPath
#17 /groupfolders/lib/Trash/TrashBackend.php(264): OCA\GroupFolders\Trash\TrashBackend::userHasAccessToPath
#16 /groupfolders/lib/Trash/TrashBackend.php(332): OCA\GroupFolders\Trash\TrashBackend::getTrashForFolders
#15 /groupfolders/lib/Trash/TrashBackend.php(81): OCA\GroupFolders\Trash\TrashBackend::listTrashRoot
#14 /files_trashbin/lib/Trash/TrashManager.php(47): OCA\Files_Trashbin\Trash\TrashManager::OCA\Files_Trashbin\Trash\{closure}
#13 [internal](0): array_reduce
#12 /files_trashbin/lib/Trash/TrashManager.php(48): OCA\Files_Trashbin\Trash\TrashManager::listTrashRoot
#11 /files_trashbin/lib/Sabre/TrashRoot.php(75): OCA\Files_Trashbin\Sabre\TrashRoot::getChildren
#10 /files_trashbin/lib/Sabre/TrashRoot.php(88): OCA\Files_Trashbin\Sabre\TrashRoot::getChild
#9 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php(83): Sabre\DAV\Tree::getNodeForPath
#8 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php(184): Sabre\DAV\Tree::delete
#7 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(281): Sabre\DAV\CorePlugin::httpDelete
#6 /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\DAV\Server::emit
#5 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(472): Sabre\DAV\Server::invokeMethod
#4 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(253): Sabre\DAV\Server::start
#3 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(321): Sabre\DAV\Server::exec
#2 /dav/lib/Server.php(370): OCA\DAV\Server::exec
#1 /dav/appinfo/v2/remote.php(35): require_once
#0 /var/www/nextcloud/remote.php(172): null

Server configuration

Operating system:

Web server:

Database:

PHP version:

Nextcloud version: 28.0.2

Group folders version:

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

Are you using external storage, if yes which one: local/s3/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/...

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

ChristophWurst avatar Feb 01 '24 16:02 ChristophWurst

As far as I can tell caused by https://github.com/nextcloud/groupfolders/pull/2754 so cc @come-nc.

ChristophWurst avatar Feb 01 '24 16:02 ChristophWurst

Hint: might be related to deleting from trash

come-nc avatar Feb 01 '24 16:02 come-nc

$path is __groupfolders/trash so yes looks like that is the case

ChristophWurst avatar Feb 01 '24 16:02 ChristophWurst

Added a test to delete from trashbin and it works, @ChristophWurst Do you have steps to reproduce?

come-nc avatar Feb 05 '24 15:02 come-nc

Seing hundreds of these erros on v28.0.8 after upgrade from 27.0.11 (GF version 16.0.7).

{
  "reqId": "yBA1OqBrxZ9SIQy323Qv",
  "level": 3,
  "time": "2024-07-19T09:57:33+02:00",
  "remoteAddr": "37.28.52.27",
  "user": "cbarth",
  "app": "PHP",
  "method": "PROPFIND",
  "url": "/remote.php/dav/trashbin/cbarth/trash/",
  "message": "Trying to access array offset on value of type null at /var/www/nextcloud/apps/groupfolders/lib/ACL/ACLManager.php#120",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0",
  "version": "28.0.8.1",
  "data": {
    "app": "PHP"
  },
  "id": "669b951a3bb40"
}

image

solracsf avatar Jul 20 '24 10:07 solracsf

Maybe we could backport https://github.com/nextcloud/groupfolders/pull/2813 ?

solracsf avatar Jul 20 '24 10:07 solracsf