Return reference should just work in PHP 5.
diff --git a/downloads/scan.php b/downloads/scan.php
index 720a9aa..0d54256 100755
--- a/downloads/scan.php
+++ b/downloads/scan.php
@@ -213,7 +213,7 @@
 	}
 }
 
-function &findCQ($bundle, $projectid, $check_parents, $check_children) {

+function findCQ($bundle, $projectid, $check_parents, $check_children) {

 	if ($cq = find_cq_for_bundle($bundle, $projectid, $check_parents, $check_children)) return $cq;
 	if (preg_match('/^com\.springsource\.(.+)$/', $bundle, $matches)) {
 		$cq = find_cq_for_bundle($matches[1], $projectid, $check_parents, $check_children);