WeBWorK Main Forum

Use of uninitialized value $result[0] in print at /opt/webwork/webwork2/lib/WeBWorK/Template.pm line 154.

Use of uninitialized value $result[0] in print at /opt/webwork/webwork2/lib/WeBWorK/Template.pm line 154.

by Christian Seberino -
Number of replies: 0
I just set up a Webwork server from the Amazon EC2 public image
and every problem seems to have this warning at the bottom...

Use of uninitialized value $result[0] in print at /opt/webwork/webwork2/lib/WeBWorK/Template.pm line 154.

Here is a snippet of that file below.  Line 154 is the "print @result;".


                               pop @ifstack; 
                        } elsif ($ifstack[-1]) { 
                                if ($cg->can($function)) { 
                                        my @result = $cg->$function({@args}); 
                                        if (@result) { 
                                                print @result; 
                                        } else { 
                                                warn "Template escape $function\
 returned an empty list."; 
                                        } 
                                } 
 

cs