summaryrefslogtreecommitdiff
path: root/include/version.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/version.php')
-rw-r--r--include/version.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/version.php b/include/version.php
index 1d7567bb1..2cf7b1ded 100644
--- a/include/version.php
+++ b/include/version.php
@@ -14,6 +14,8 @@
if (preg_match("/^ref: (.*)/", $head, $matches)) {
$ref = $matches[1];
+ if (!file_exists("$root_dir/.git/$ref"))
+ return VERSION_STATIC;
$suffix = substr(trim(file_get_contents("$root_dir/.git/$ref")), 0, 7);
$timestamp = filemtime("$root_dir/.git/$ref");