diff options
author | michaelletzgus <michaelletzgus@users.noreply.github.com> | 2018-02-04 17:59:23 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-03-06 20:37:52 +0300 |
commit | 7e651ffd54350ba24706d220306b1121b8676d0a (patch) | |
tree | 207d88deda629404dd37c3a75e5b720ba0445f60 /lib | |
parent | a637e0d686a2e0f358074b76ab6e4396906b2f01 (diff) |
Fix undefined index problem
Nextcloud 13RC4, error in logfile, triggered by "occ config:list":
Invalid argument supplied for foreach() at lib/private/AppConfig.php#297
PHP Undefined index: workflowengine at lib/private/AppConfig.php#297
Fix: Check if index exists in array before using it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppConfig.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php index 4e102522550..10dc656e5cb 100644 --- a/lib/private/AppConfig.php +++ b/lib/private/AppConfig.php @@ -293,9 +293,11 @@ class AppConfig implements IAppConfig { public function getFilteredValues($app) { $values = $this->getValues($app, false); - foreach ($this->sensitiveValues[$app] as $sensitiveKey) { - if (isset($values[$sensitiveKey])) { - $values[$sensitiveKey] = IConfig::SENSITIVE_VALUE; + if (array_key_exists($app, $this->sensitiveValues)) { + foreach ($this->sensitiveValues[$app] as $sensitiveKey) { + if (isset($values[$sensitiveKey])) { + $values[$sensitiveKey] = IConfig::SENSITIVE_VALUE; + } } } |