[LON-CAPA-cvs] cvs: loncom /interface lonmsgdisplay.pm

raeburn raeburn@source.lon-capa.org
Sat, 20 Nov 2010 13:06:59 -0000


raeburn		Sat Nov 20 13:06:59 2010 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  - Sanity checking for ref to array.
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.154 loncom/interface/lonmsgdisplay.pm:1.155
--- loncom/interface/lonmsgdisplay.pm:1.154	Sat Aug  7 19:23:51 2010
+++ loncom/interface/lonmsgdisplay.pm	Sat Nov 20 13:06:58 2010
@@ -1,7 +1,7 @@
 # $textareaclass The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.154 2010/08/07 19:23:51 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.155 2010/11/20 13:06:58 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2646,12 +2646,14 @@
             }
             if ($content{'group'} ne '') {
                 if (&check_group_priv($content{'group'})) {
-                    $groupcclist = join(', ',@{$recipients{'group_cc_broadcast'}});
-                    if ($groupcclist) {
-                        $r->print(&Apache::lonhtmlcommon::row_title(&mt('Group Cc'))
-                                 .$groupcclist
-                                 .&Apache::lonhtmlcommon::row_closure()
-                        );
+                    if (ref($recipients{'group_cc_broadcast'}) eq 'ARRAY') { 
+                        $groupcclist = join(', ',@{$recipients{'group_cc_broadcast'}});
+                        if ($groupcclist) {
+                            $r->print(&Apache::lonhtmlcommon::row_title(&mt('Group Cc'))
+                                     .$groupcclist
+                                     .&Apache::lonhtmlcommon::row_closure()
+                            );
+                        }
                     }
                 }
             }