From 88da55c5d186efaa3ca802881c3cb1533f9c8145 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 9 Jan 2017 14:27:56 +0000 Subject: [PATCH] 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. --- IkiWiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index fa71f4791..6aa49229a 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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);