Only set cache lifetime if there's one to set
Only set cache lifetime if there's one to set

file:a/index.php -> file:b/index.php
--- a/index.php
+++ b/index.php
@@ -55,7 +55,8 @@
  */
  if ($gitphp_conf['cache']) {
  	$tpl->caching = 2;
-	$tpl->cache_lifetime = $gitphp_conf['cachelifetime'];
+	if (isset($gitphp_conf['cachelifetime']))
+		$tpl->cache_lifetime = $gitphp_conf['cachelifetime'];
 	if (!(isset($gitphp_conf['cacheexpire']) && ($gitphp_conf['cacheexpire'] === FALSE))) {
 		require_once('include/cache.cache_expire.php');
 		cache_expire($gitphp_conf['projectroot'], (isset($_GET['p']) ? $_GET['p'] : null), $git_projects);

comments