We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression from #44004
server/lib/private/Share20/DefaultShareProvider.php
Line 1156 in 0e74972
{ "reqId": "kT3f4APf3ie4SV9q8UBV", "level": 3, "time": "2024-03-19T11:57:56+00:00", "remoteAddr": "172.18.0.1", "user": "admin", "app": "index", "method": "GET", "url": "/apps/files/files/334420?dir=/Photos/Test%20drop/Portraits", "message": "Call to a member function setPermissions() on null in file '/var/www/nextcloud/lib/private/Share20/DefaultShareProvider.php' line 1156", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36", "version": "29.0.0.10", "exception": { "Exception": "Exception", "Message": "Call to a member function setPermissions() on null in file '/var/www/nextcloud/lib/private/Share20/DefaultShareProvider.php' line 1156", "Code": 0, "Trace": [ { "file": "/var/www/nextcloud/lib/private/AppFramework/App.php", "line": 184, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OCA\\Files\\Controller\\ViewController" ], "indexViewFileid" ] }, { "file": "/var/www/nextcloud/lib/private/Route/Router.php", "line": 338, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": [ "OCA\\Files\\Controller\\ViewController", "indexViewFileid", [ "OC\\AppFramework\\DependencyInjection\\DIContainer" ], [ "files", "334420", "files.view.indexviewfileid" ] ] }, { "file": "/var/www/nextcloud/lib/base.php", "line": 1050, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": [ "/apps/files/files/334420" ] }, { "file": "/var/www/nextcloud/index.php", "line": 49, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "Line": 170, "Previous": { "Exception": "Error", "Message": "Call to a member function setPermissions() on null", "Code": 0, "Trace": [ { "file": "/var/www/nextcloud/lib/private/Share20/DefaultShareProvider.php", "line": 1019, "function": "resolveGroupShares", "class": "OC\\Share20\\DefaultShareProvider", "type": "->", "args": [ [ [ "OC\\Share20\\Share" ], [ "OC\\Share20\\Share" ], [ "OC\\Share20\\Share" ], [ "OC\\Share20\\Share" ], [ "OC\\Share20\\Share" ], [ "OC\\Share20\\Share" ], [ "OC\\Share20\\Share" ] ], "admin" ] }, { "file": "/var/www/nextcloud/lib/private/Share20/Manager.php", "line": 1411, "function": "getSharedWith", "class": "OC\\Share20\\DefaultShareProvider", "type": "->", "args": [ "admin", 1, null, -1, 0 ] }, { "file": "/var/www/nextcloud/apps/files_sharing/lib/MountProvider.php", "line": 68, "function": "getSharedWith", "class": "OC\\Share20\\Manager", "type": "->", "args": [ "admin", 1, null, -1 ] }, { "file": "/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php", "line": 89, "function": "getMountsForUser", "class": "OCA\\Files_Sharing\\MountProvider", "type": "->", "args": [ [ "OC\\User\\User" ], [ "OC\\Files\\Storage\\StorageFactory" ] ] }, { "file": "/var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php", "line": 146, "function": "getMountsFromProvider", "class": "OC\\Files\\Config\\MountProviderCollection", "type": "->", "args": [ [ "OCA\\Files_Sharing\\MountProvider" ], [ "OC\\User\\User" ], [ "OC\\Files\\Storage\\StorageFactory" ] ] }, { "file": "/var/www/nextcloud/lib/private/Files/SetupManager.php", "line": 221, "function": "addMountForUser", "class": "OC\\Files\\Config\\MountProviderCollection", "type": "->", "args": [ [ "OC\\User\\User" ], [ "OC\\Files\\Mount\\Manager" ], [ "Closure" ] ] }, { "file": "/var/www/nextcloud/lib/private/Files/SetupManager.php", "line": 320, "function": "OC\\Files\\{closure}", "class": "OC\\Files\\SetupManager", "type": "->", "args": [ "*** sensitive parameters replaced ***" ] }, { "file": "/var/www/nextcloud/lib/private/Files/SetupManager.php", "line": 222, "function": "setupForUserWith", "class": "OC\\Files\\SetupManager", "type": "->", "args": [ [ "OC\\User\\User" ], [ "Closure" ] ] }, { "file": "/var/www/nextcloud/lib/private/Files/SetupManager.php", "line": 504, "function": "setupForUser", "class": "OC\\Files\\SetupManager", "type": "->", "args": [ [ "OC\\User\\User" ] ] }, { "file": "/var/www/nextcloud/lib/private/Files/Mount/Manager.php", "line": 231, "function": "setupForProvider", "class": "OC\\Files\\SetupManager", "type": "->", "args": [ "/admin/files", [ "OC\\Files\\Mount\\LocalHomeMountProvider" ] ] }, { "file": "/var/www/nextcloud/lib/private/Files/Node/Root.php", "line": 475, "function": "getMountsByMountProvider", "class": "OC\\Files\\Mount\\Manager", "type": "->", "args": [ "/admin/files", [ "OC\\Files\\Mount\\LocalHomeMountProvider" ] ] }, { "file": "/var/www/nextcloud/lib/private/Files/Node/Root.php", "line": 427, "function": "getByIdInPath", "class": "OC\\Files\\Node\\Root", "type": "->", "args": [ 334420, "/admin/files" ] }, { "file": "/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php", "line": 499, "function": "getFirstNodeByIdInPath", "class": "OC\\Files\\Node\\Root", "type": "->", "args": [ 334420, "/admin/files" ] }, { "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php", "line": 347, "function": "getFirstNodeById", "class": "OC\\Files\\Node\\LazyFolder", "type": "->", "args": [ 334420 ] }, { "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php", "line": 196, "function": "redirectToFileIfInTrashbin", "class": "OCA\\Files\\Controller\\ViewController", "type": "->", "args": [ 334420 ] }, { "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php", "line": 179, "function": "index", "class": "OCA\\Files\\Controller\\ViewController", "type": "->", "args": [ "/Photos/Test drop/Portraits", "files", "334420", false ] }, { "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 232, "function": "indexViewFileid", "class": "OCA\\Files\\Controller\\ViewController", "type": "->", "args": [ "/Photos/Test drop/Portraits", "files", "334420", false ] }, { "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php", "line": 138, "function": "executeController", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OCA\\Files\\Controller\\ViewController" ], "indexViewFileid" ] }, { "file": "/var/www/nextcloud/lib/private/AppFramework/App.php", "line": 184, "function": "dispatch", "class": "OC\\AppFramework\\Http\\Dispatcher", "type": "->", "args": [ [ "OCA\\Files\\Controller\\ViewController" ], "indexViewFileid" ] }, { "file": "/var/www/nextcloud/lib/private/Route/Router.php", "line": 338, "function": "main", "class": "OC\\AppFramework\\App", "type": "::", "args": [ "OCA\\Files\\Controller\\ViewController", "indexViewFileid", [ "OC\\AppFramework\\DependencyInjection\\DIContainer" ], [ "files", "334420", "files.view.indexviewfileid" ] ] }, { "file": "/var/www/nextcloud/lib/base.php", "line": 1050, "function": "match", "class": "OC\\Route\\Router", "type": "->", "args": [ "/apps/files/files/334420" ] }, { "file": "/var/www/nextcloud/index.php", "line": 49, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "/var/www/nextcloud/lib/private/Share20/DefaultShareProvider.php", "Line": 1156 }, "message": "Call to a member function setPermissions() on null in file '/var/www/nextcloud/lib/private/Share20/DefaultShareProvider.php' line 1156", "exception": {}, "CustomMessage": "Call to a member function setPermissions() on null in file '/var/www/nextcloud/lib/private/Share20/DefaultShareProvider.php' line 1156" } }
The text was updated successfully, but these errors were encountered:
@icewind1991
Sorry, something went wrong.
Suggestion
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 213423d4755..c22c65f6c7b 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -1153,10 +1153,12 @@ class DefaultShareProvider implements IShareProvider { $stmt = $query->execute(); while ($data = $stmt->fetch()) { - $shareMap[$data['parent']]->setPermissions((int)$data['permissions']); - $shareMap[$data['parent']]->setStatus((int)$data['accepted']); - $shareMap[$data['parent']]->setTarget($data['file_target']); - $shareMap[$data['parent']]->setParent($data['parent']); + if (array_key_exists($data['parent'], $shareMap)) { + $shareMap[$data['parent']]->setPermissions((int)$data['permissions']); + $shareMap[$data['parent']]->setStatus((int)$data['accepted']); + $shareMap[$data['parent']]->setTarget($data['file_target']); + $shareMap[$data['parent']]->setParent($data['parent']); + } } return array_values($shareMap);
Successfully merging a pull request may close this issue.
Regression from #44004
Context
Code
server/lib/private/Share20/DefaultShareProvider.php
Line 1156 in 0e74972
Log
The text was updated successfully, but these errors were encountered: