From 09226f0e177297af8e213980ab49184f4b7e920e Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 16 Mar 2011 15:28:42 +0000 Subject: [PATCH] Fix missing sub-categories when exporting main + sub categories, main categories in their own column --- addressbook/inc/class.addressbook_export_contacts_csv.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php index 8ee854a7fd..c48a2a3cd6 100644 --- a/addressbook/inc/class.addressbook_export_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_export_contacts_csv.inc.php @@ -282,6 +282,7 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi if($explode_settings['explode'] == self::MAIN_CATS && count(array_intersect($record->$field, array_keys($settings['subs'])))) { // 3 part assign due to magic get method $record_value = $record->$field_name; + if(!is_array($record_value)) $record_value = array($record_value); foreach(array_intersect($record->$field, array_keys($settings['subs'])) as $sub_id) { $record_value[] = $options['convert'] ? $settings['subs'][$sub_id] : $sub_id; }