[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
raeburn
raeburn at source.lon-capa.org
Wed Nov 30 23:14:12 EST 2011
raeburn Thu Dec 1 04:14:12 2011 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
- Eliminate "Use of uninitialized value in concatenation (.) or string" warnings.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.524 loncom/xml/lonxml.pm:1.525
--- loncom/xml/lonxml.pm:1.524 Mon Nov 21 21:45:36 2011
+++ loncom/xml/lonxml.pm Thu Dec 1 04:14:12 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.524 2011/11/21 21:45:36 www Exp $
+# $Id: lonxml.pm,v 1.525 2011/12/01 04:14:12 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2049,11 +2049,13 @@
while (my $token = $parser->get_token()) {
if ($token->[0] eq 'S') {
my $key;
- if ($token->[1] eq 'tag') {
+ if ($token->[1] eq 'tag') {
$tag = $token->[2]{'name'};
- $insertlist{$tagnum.'.tag'} = $tag;
- $insertlist{$tag.'.num'} = $tagnum;
- push(@alltags,$tag);
+ if (defined($tag)) {
+ $insertlist{$tagnum.'.tag'} = $tag;
+ $insertlist{$tag.'.num'} = $tagnum;
+ push(@alltags,$tag);
+ }
} elsif ($in_help && $token->[1] eq 'file') {
$key = $tag.'.helpfile';
} elsif ($in_help && $token->[1] eq 'description') {
More information about the LON-CAPA-cvs
mailing list