Index: trunk/roundcubemail/program/steps/addressbook/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/func.inc	(revision 4869)
+++ trunk/roundcubemail/program/steps/addressbook/func.inc	(revision 4878)
@@ -671,5 +671,5 @@
 
     $cid    = get_input_value('_cid', RCUBE_INPUT_GPC);
-    $source = get_input_value('_source', RCUBE_INPUT_GPC);
+    $source = (string) get_input_value('_source', RCUBE_INPUT_GPC);
 
     if (!preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid)) {
@@ -687,8 +687,5 @@
             list ($c, $s) = explode('-', $id, 2);
             if (strlen($s)) {
-                $result[$s][] = $c;
-            }
-            else if (strlen($source)) {
-                $result[$source][] = $c;
+                $result[(string)$s][] = $c;
             }
         }
