From bb0473577998ff275a3f28b279a74948dc2ef044 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 21 Feb 2017 13:23:35 +0000 Subject: Do not re-stat non-existent files. The versioning code wasn't remembering when it had found that a file did not exist, so was checking for them each time. --- perllib/FixMyStreet/App/View/Web.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index b73fa82ef..496463700 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -155,7 +155,7 @@ sub version { sub _version_get_mtime { my $file = shift; - unless ($version_hash{$file} && !FixMyStreet->config('STAGING_SITE')) { + unless (defined $version_hash{$file} && !FixMyStreet->config('STAGING_SITE')) { my $path = FixMyStreet->path_to('web', $file); $version_hash{$file} = ( stat( $path ) )[9] || 0; } -- cgit v1.2.3