summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_group.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/kolab_api_service_group.php')
-rw-r--r--lib/api/kolab_api_service_group.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/kolab_api_service_group.php b/lib/api/kolab_api_service_group.php
index 700ff25..3e82f0d 100644
--- a/lib/api/kolab_api_service_group.php
+++ b/lib/api/kolab_api_service_group.php
@@ -64,7 +64,7 @@ class kolab_api_service_group extends kolab_api_service
error_log("form field $key");
if (
(!isset($postdata[$key]) || empty($postdata[$key]) &&
- !(array_key_exists('optional', $value) || $value['optional'])
+ (!array_key_exists('optional', $value) || !$value['optional'])
) {
throw new Exception("Missing input value for $key", 345);
}
@@ -77,7 +77,7 @@ class kolab_api_service_group extends kolab_api_service
if (isset($gta['auto_form_fields'])) {
foreach ($gta['auto_form_fields'] as $key => $value) {
if (empty($postdata[$key])) {
- if (!array_key_exists('optional', $value) || $value['optional']) {
+ if (!array_key_exists('optional', $value) || !$value['optional']) {
$postdata['attributes'] = array($key);
$res = $form_service->generate($getdata, $postdata);
$postdata[$key] = $res[$key];
@@ -166,7 +166,7 @@ class kolab_api_service_group extends kolab_api_service
foreach ($gta['form_fields'] as $key => $value) {
if (
(!isset($postdata[$key]) || empty($postdata[$key])) &&
- !(array_key_exists('optional', $value) && $value['optional'])
+ (!array_key_exists('optional', $value) || !$value['optional'])
) {
throw new Exception("Missing input value for $key", 345);
}
@@ -179,7 +179,7 @@ class kolab_api_service_group extends kolab_api_service
if (isset($gta['auto_form_fields'])) {
foreach ($gta['auto_form_fields'] as $key => $value) {
if (empty($postdata[$key])) {
- if (!array_key_exists('optional', $value) || $value['optional']) {
+ if (!array_key_exists('optional', $value) || !$value['optional']) {
$postdata['attributes'] = array($key);
$res = $form_service->generate($getdata, $postdata);
$postdata[$key] = $res[$key];