summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/steps/addressbook/export.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc
index 2b45e5cd1..a6d3af978 100644
--- a/program/steps/addressbook/export.inc
+++ b/program/steps/addressbook/export.inc
@@ -103,7 +103,9 @@ header('Content-Type: text/x-vcard; charset='.RCUBE_CHARSET);
header('Content-Disposition: attachment; filename="contacts.vcf"');
while ($result && ($row = $result->next())) {
- prepare_for_export($row, $CONTACTS);
+ if ($CONTACTS) {
+ prepare_for_export($row, $CONTACTS);
+ }
// fix folding and end-of-line chars
$row['vcard'] = preg_replace('/\r|\n\s+/', '', $row['vcard']);