diff --git a/misc/cronjobs/runreport.pl b/misc/cronjobs/runreport.pl index 89ef2154c1..6732afae9c 100755 --- a/misc/cronjobs/runreport.pl +++ b/misc/cronjobs/runreport.pl @@ -265,7 +265,7 @@ foreach my $report_id (@ARGV) { } # convert SQL parameters to placeholders - my $params_needed = ( $sql =~ s/(<<.*?>>)/\?/g ); + my $params_needed = ( $sql =~ s/(<<[^>]+>>)/\?/g ); die("You supplied ". scalar @params . " parameter(s) and $params_needed are required by the report") if scalar @params != $params_needed; my ($sth) = execute_query( $sql, undef, undef, \@params, $report_id );