Skip to content
Snippets Groups Projects
Unverified Commit cfa694ea authored by michaelletzgus's avatar michaelletzgus Committed by GitHub
Browse files

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.
parent 58b568fd
No related branches found
No related tags found
No related merge requests found
......@@ -288,9 +288,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;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment