]> git.wh0rd.org - tt-rss.git/commitdiff
Merge branch 'fix/git-packed-ref' of tobidope/tt-rss into master
authorfox <fox+git@fakecake.org>
Thu, 14 Jun 2018 04:27:11 +0000 (04:27 +0000)
committerGogs <gogs@fake.local>
Thu, 14 Jun 2018 04:27:11 +0000 (04:27 +0000)
include/version.php

index 1d7567bb19281ebfce3faa14a1104ea50a925f5f..2cf7b1ded92f4a9f03553db9a4fdae96a4633665 100644 (file)
@@ -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");