Bug 16219: (QA follow-up) Tiny regex change
The parameter <<>> does not work. There should be text inside.
The construction .*? does not look good completely.
Replacing it by the stricter [^>]+ So, no greater than's and at least one.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e66ccaa3a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
2c598a55d4
commit
bf3bed483a
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue