From b5c4e7d85c3069551945ecfddd42b44cbb1defc8 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 10 May 2012 13:14:39 -0400
Subject: [PATCH] Fix PHP warning on PHP 5.4 (#1488469)

---
 program/steps/addressbook/func.inc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index e52da39..f79cac0 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -593,7 +593,12 @@
                         $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;

--
Gitblit v1.9.1