summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-21 12:47:06 +0200
committerAleksander Machniak <alec@alec.pl>2013-08-21 12:47:44 +0200
commit03bf331975636079d51c7fc6975242734bec9161 (patch)
tree01905c421e7596ad710df44e40e84f27d88a429f /lib
parent316aabfa0de49833e2ee0766cc3556e7b1580de7 (diff)
downloadwebadmin-03bf331975636079d51c7fc6975242734bec9161.tar.gz
Fix PHP warning when form_fields attribute is not an array (doesn't exist)
Diffstat (limited to 'lib')
-rw-r--r--lib/api/kolab_api_service_form_value.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php
index 344a9e7..7f62a08 100644
--- a/lib/api/kolab_api_service_form_value.php
+++ b/lib/api/kolab_api_service_form_value.php
@@ -223,13 +223,13 @@ class kolab_api_service_form_value extends kolab_api_service
}
}
- if (array_key_exists($attr_name, $attribs['form_fields'])) {
+ if (array_key_exists($attr_name, (array) $attribs['form_fields'])) {
if (empty($attribs['form_fields'][$attr_name]['optional'])) {
$attribs['form_fields'][$attr_name]['optional'] = false;
}
}
- if (array_key_exists($attr_name, $attribs['form_fields'])) {
+ if (array_key_exists($attr_name, (array) $attribs['form_fields'])) {
if (empty($attribs['form_fields'][$attr_name]['validate'])) {
$attribs['form_fields'][$attr_name]['validate'] = true;
}