summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-05-10 19:14:39 +0200
committerAleksander Machniak <alec@alec.pl>2012-05-10 19:25:14 +0200
commit8253e7d245b03a2bfd5b51573e5d1024e45022ce (patch)
tree6902e960a28a1de794a4558f7e3c86f680ad405e
parent82e1bd22a16484abc7621397bb8348a2cf398c9f (diff)
Fix PHP warning on PHP 5.4 (#1488469)
-rw-r--r--program/steps/addressbook/func.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index a31370b16..bd3819436 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -593,7 +593,12 @@ function rcmail_contact_form($form, $record, $attrib = null)
$composite = array(); $j = 0;
$template = $RCMAIL->config->get($col . '_template', '{'.join('} {', array_keys($colprop['childs'])).'}');
foreach ($colprop['childs'] as $childcol => $cp) {
- $childvalue = $val[$childcol] ? $val[$childcol] : $val[$j];
+ if (!empty($val) && is_array($val)) {
+ $childvalue = $val[$childcol] ? $val[$childcol] : $val[$j];
+ }
+ else {
+ $childvalue = '';
+ }
if ($edit_mode) {
if ($colprop['subtypes'] || $colprop['limit'] != 1) $cp['array'] = true;