check_canchange: report invalid filenames as intended

Instead of logging "bad file name %s" and attempting to call the
(string) filename as a subroutine, actually do the intended
sprintf operation.
master
Simon McVittie 2017-01-09 14:27:56 +00:00
parent 7586f5165e
commit 88da55c5d1
1 changed files with 1 additions and 1 deletions

View File

@ -1826,7 +1826,7 @@ sub check_canchange (@) {
$file=possibly_foolish_untaint($file);
if (! defined $file || ! length $file ||
file_pruned($file)) {
error(gettext("bad file name %s"), $file);
error(sprintf(gettext("bad file name %s"), $file));
}
my $type=pagetype($file);