Log Message:
-----------
Avoid undefined value of $name.
Modified Files:
--------------
pg/lib:
Parser.pm
Revision Data
-------------
Index: Parser.pm
===================================================================
RCS file: /webwork/cvs/system/pg/lib/Parser.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -Llib/Parser.pm -Llib/Parser.pm -u -r1.29 -r1.30
--- lib/Parser.pm
+++ lib/Parser.pm
@@ -470,7 +470,7 @@
my $self = shift; my $context = $self->{context};
my $top = $self->pop->{value}; my $fn = $self->pop;
my $constant = $top->{isConstant};
- if ($context->{parens}{$top->{open}}{function} &&
+ if ($top->{open} && $context->{parens}{$top->{open}}{function} &&
$context->{parens}{$top->{open}}{close} eq $top->{close} &&
!$context->{functions}{$fn->{name}}{vectorInput})
{$top = $top->coords} else {$top = [$top]}
@@ -641,7 +641,7 @@
# then the variables from the formula are used in sorted order.)
#
sub perlFunction {
- my $self = shift; my $name = shift; my $vars = shift;
+ my $self = shift; my $name = shift || ''; my $vars = shift;
$vars = [sort(keys %{$self->{variables}})] unless $vars;
my $n = scalar(@{$vars}); my $vnames = '';
if ($n > 0) {
|