From ae80b5a309be69a47b438e2dc1e342735b5e22aa Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 11 Jun 2013 06:08:44 -0400
Subject: [PATCH] Fix error when there's no writeable addressbook source (#1489162)
---
program/include/rcmail.php | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 22d0811..fd625ba 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -228,6 +228,11 @@
}
if (!$contacts) {
+ // there's no default, just return
+ if ($default) {
+ return null;
+ }
+
self::raise_error(array(
'code' => 700, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
--
Gitblit v1.9.1