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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 28 Mar 2002 22:15:56 -0000


albertel		Thu Mar 28 17:15:56 2002 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - must used defined(), since if $ENV{'form.'$name} had a value of 0 it would get pasted over.
  
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.29 loncom/interface/loncommon.pm:1.30
--- loncom/interface/loncommon.pm:1.29	Thu Mar 28 16:38:53 2002
+++ loncom/interface/loncommon.pm	Thu Mar 28 17:15:56 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.29 2002/03/28 21:38:53 www Exp $
+# $Id: loncommon.pm,v 1.30 2002/03/28 22:15:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -367,7 +367,7 @@
       $value =~ tr/+/ /;
       $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
       &Apache::lonxml::debug("Seting :$name: to :$value:");
-      unless ($ENV{'form.'.$name}) { &add_to_env('form.'.$name,$value) };
+      unless (defined($ENV{'form.'.$name})) { &add_to_env('form.'.$name,$value) };
     }
   }
 }