avoid php syntax error if autov() source file does not exist

This commit is contained in:
Tom Mortensen
2020-12-18 17:22:32 -08:00
parent 913e0980e0
commit 60a960e051
+1 -1
View File
@@ -231,7 +231,7 @@ function autov($file,$ret=false) {
global $docroot;
$path = $docroot.$file;
clearstatcache(true, $path);
$time = strlen(@filemtime($path)) ? @filemtime($path) : 'autov_fileDoesntExist';
$time = file_exists($path) ? filemtime($path) : 'autov_fileDoesntExist';
$newFile = "$file?v=".$time;
if ($ret)
return $newFile;