--- loncom/xml/run.pm 2006/01/11 08:56:13 1.56
+++ loncom/xml/run.pm 2006/02/20 23:52:20 1.57
@@ -1,6 +1,6 @@
package Apache::run;
#
-# $Id: run.pm,v 1.56 2006/01/11 08:56:13 albertel Exp $
+# $Id: run.pm,v 1.57 2006/02/20 23:52:20 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -140,8 +140,10 @@ sub run {
if ($innererror=~/line (\d+)/) {
my $linenumber=$1;
my @code=split("\n",$code);
- $code[$linenumber-1]=''.
- $code[$linenumber-1].'';
+ if ($linenumber < scalar(@code)) {
+ $code[$linenumber-1]=''.
+ $code[$linenumber-1].'';
+ }
$code=join("\n",@code);
}
&Apache::lonxml::error($errormsg.$code.'');