diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-09-24 12:48:44 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-09-24 12:48:44 +0200 |
commit | 5a3e57c2f5e558f88fbd83010ff64632bec46123 (patch) | |
tree | 0905385663ff3b47c6cf5a2e80c73cb66435183d /lib/private/app | |
parent | 9b652ed5d50a40a1edde0f1b8c859f49ff8248c9 (diff) | |
download | nextcloud-server-5a3e57c2f5e558f88fbd83010ff64632bec46123.tar.gz nextcloud-server-5a3e57c2f5e558f88fbd83010ff64632bec46123.zip |
encode arrays as string
Diffstat (limited to 'lib/private/app')
-rw-r--r-- | lib/private/app/codechecker/infochecker.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/app/codechecker/infochecker.php b/lib/private/app/codechecker/infochecker.php index 2af72ebedc3..1272707a339 100644 --- a/lib/private/app/codechecker/infochecker.php +++ b/lib/private/app/codechecker/infochecker.php @@ -39,6 +39,7 @@ class InfoChecker extends BasicEmitter { private $optionalFields = [ 'bugs', 'category', + 'dependencies', 'documentation', 'namespace', 'ocsid', @@ -51,6 +52,7 @@ class InfoChecker extends BasicEmitter { ]; private $deprecatedFields = [ 'default_enable', + 'info', 'public', 'remote', 'shipped', @@ -76,6 +78,9 @@ class InfoChecker extends BasicEmitter { $info = $this->infoParser->parse($appPath . '/appinfo/info.xml'); foreach ($info as $key => $value) { + if(is_array($value)) { + $value = json_encode($value); + } if (in_array($key, $this->mandatoryFields)) { $this->emit('InfoChecker', 'mandatoryFieldFound', [$key, $value]); continue; @@ -88,7 +93,7 @@ class InfoChecker extends BasicEmitter { if (in_array($key, $this->deprecatedFields)) { // skip empty arrays - empty arrays for remote and public are always added - if($value === []) { + if($value === '[]' && in_array($key, ['public', 'remote', 'info'])) { continue; } $this->emit('InfoChecker', 'deprecatedFieldFound', [$key, $value]); |