X-Git-Url: http://git.pk910.de/?p=phpgitweb.git;a=blobdiff_plain;f=htdocs%2Flib%2FGitCommand.class.php;fp=htdocs%2Flib%2FGitCommand.class.php;h=198cc61f6ce166f5e7fcbe78d2dd7be7ee0fb13e;hp=86174b5e6e29551eba91a7757378208d913fe9eb;hb=45f97c3c11bdffe296ccfc853621fd2fff1732a1;hpb=cd7a55f7a23c5981e26ff410bcf27d9ded5a0d38 diff --git a/htdocs/lib/GitCommand.class.php b/htdocs/lib/GitCommand.class.php index 86174b5..198cc61 100644 --- a/htdocs/lib/GitCommand.class.php +++ b/htdocs/lib/GitCommand.class.php @@ -68,8 +68,10 @@ class GitCommand { if($ref) $args[] = $ref; $age = self::git_execute($args, $git_path); - preg_match("/[0-9]{9,}/i", $age, $result); - return $result[0]; + if(preg_match("/[0-9]{9,}/i", $age, $result)) + return $result[0]; + else + return -1; } private static function parse_commit($commit_data) {