aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh <josh.t.richards@gmail.com>2024-06-10 11:56:08 -0400
committerGitHub <noreply@github.com>2024-06-10 11:56:08 -0400
commit4e3aaec9df429d4c8d903c60549ea04cebf74e40 (patch)
treeb59bf90a6c3988336e46b3bc38cf85a07981a679
parent21a0009553d81aeb9910111c763c4a2a16581022 (diff)
parentc494a0cc63d1079951c854f0412b0f6f58b57078 (diff)
downloadnextcloud-server-4e3aaec9df429d4c8d903c60549ea04cebf74e40.tar.gz
nextcloud-server-4e3aaec9df429d4c8d903c60549ea04cebf74e40.zip
Merge pull request #45737 from nextcloud/jtr/fix-appmanager-checkappforX-log
fix(AppManager): Name correct method in error + show error string
-rw-r--r--lib/private/App/AppManager.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index 99d1c913ced..0786fbded20 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -319,7 +319,9 @@ class AppManager implements IAppManager {
if (!is_array($groupIds)) {
$jsonError = json_last_error();
- $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError);
+ $jsonErrorMsg = json_last_error_msg();
+ // this really should never happen (if it does, the admin should check the `enabled` key value via `occ config:list` because it's bogus for some reason)
+ $this->logger->warning('AppManager::checkAppForUser - can\'t decode group IDs listed in app\'s enabled config key: ' . print_r($enabled, true) . ' - JSON error (' . $jsonError . ') ' . $jsonErrorMsg);
return false;
}
@@ -345,7 +347,9 @@ class AppManager implements IAppManager {
if (!is_array($groupIds)) {
$jsonError = json_last_error();
- $this->logger->warning('AppManger::checkAppForUser - can\'t decode group IDs: ' . print_r($enabled, true) . ' - json error code: ' . $jsonError);
+ $jsonErrorMsg = json_last_error_msg();
+ // this really should never happen (if it does, the admin should check the `enabled` key value via `occ config:list` because it's bogus for some reason)
+ $this->logger->warning('AppManager::checkAppForGroups - can\'t decode group IDs listed in app\'s enabled config key: ' . print_r($enabled, true) . ' - JSON error (' . $jsonError . ') ' . $jsonErrorMsg);
return false;
}