agecmp was comparing nonexistent key
agecmp was comparing nonexistent key

--- a/include/util.agecmp.php
+++ b/include/util.agecmp.php
@@ -29,9 +29,9 @@
 	global $gitphp_conf;
 	$ca = git_read_commit($gitphp_conf['projectroot'] . $a, git_read_head($gitphp_conf['projectroot'] . $a));
 	$cb = git_read_commit($gitphp_conf['projectroot'] . $b, git_read_head($gitphp_conf['projectroot'] . $b));
-	if ($ca['commit']['age'] == $cb['commit']['age'])
+	if ($ca['age'] == $cb['age'])
 		return 0;
-	return ($ca['commit']['age'] < $cb['commit']['age'] ? 1 : -1);
+	return ($ca['age'] < $cb['age'] ? 1 : -1);
 }
 
 ?>

comments