ProjectController::build(): Moved the check on whether the project could be found up: no point in trying to get a list of branches of a project that doesn't even exist.
This commit is contained in:
parent
1d8da6bfc0
commit
c68cb33fa5
|
@ -133,14 +133,14 @@ class ProjectController extends PHPCensor\Controller
|
|||
break;
|
||||
}
|
||||
|
||||
if (empty($branch)) {
|
||||
$branch = $project->getBranch();
|
||||
}
|
||||
|
||||
if (empty($project) || $project->getArchived()) {
|
||||
throw new NotFoundException(Lang::get('project_x_not_found', $projectId));
|
||||
}
|
||||
|
||||
if (empty($branch)) {
|
||||
$branch = $project->getBranch();
|
||||
}
|
||||
|
||||
$debug = (boolean)$this->getParam('debug', false);
|
||||
$extra = null;
|
||||
if ($debug && $this->currentUserIsAdmin()) {
|
||||
|
|
Loading…
Reference in a new issue