cfh: avoid warning when passing null git_projects
cfh: avoid warning when passing null git_projects

Signed-off-by: Chris Han <xiphux@gmail.com>

file:a/index.php -> file:b/index.php
--- a/index.php
+++ b/index.php
@@ -208,7 +208,11 @@
 	}
  } else {
 	require_once('include/display.git_project_list.php');
- 	git_project_list($gitphp_conf['projectroot'],$git_projects,(isset($_GET['o']) ? $_GET['o'] : "project"));
+	if (isset($git_projects)) {
+		git_project_list($gitphp_conf['projectroot'],$git_projects,(isset($_GET['o']) ? $_GET['o'] : "project"));
+	} else {
+		git_project_list($gitphp_conf['projectroot'],NULL,(isset($_GET['o']) ? $_GET['o'] : "project"));
+	}
  }
 
  if ($gitphp_conf['debug'] && $extraoutput)

comments