Aleksander Machniak
2015-02-16 ae73c26f29aa230ba5ae3d86ef6d0c7886b7e657
Merge branch 'master' of github.com:roundcube/roundcubemail
1 files modified
7 ■■■■■ changed files
program/steps/addressbook/export.inc 7 ●●●●● patch | view | raw | blame | history
program/steps/addressbook/export.inc
@@ -133,12 +133,13 @@
        foreach ($record as $key => $values) {
            list($field, $section) = explode(':', $key);
            // avoid casting DateTime objects to array
            // avoid unwanted casting of DateTime objects to an array
            // (same as in rcube_contacts::convert_save_data())
            if (is_object($values) && is_a($values, 'DateTime')) {
                $values = array(0 => $values);
                $values = array($values);
            }
            foreach ($values as $value) {
            foreach ((array) $values as $value) {
                if (is_array($value) || is_a($value, 'DateTime') || @strlen($value)) {
                    $vcard->set($field, $value, strtoupper($section));
                }