summaryrefslogtreecommitdiff
path: root/app/Controller/Project.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-09 23:08:16 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-09 23:08:16 -0400
commit98aab0d99465b40907bbc1f1108ea20db290e036 (patch)
tree91c8939a98e13d998a5b33d58d61e9db920cafc0 /app/Controller/Project.php
parent4641d4cf77aac54b1c5688a10e78642b8cda2e87 (diff)
Fix some php analyzer issues
Diffstat (limited to 'app/Controller/Project.php')
-rw-r--r--app/Controller/Project.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index 165ed2df..185c55be 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -405,7 +405,7 @@ class Project extends Base
$project = $this->project->getByToken($token);
// Token verification
- if (! $project) {
+ if (empty($project)) {
$this->forbidden(true);
}
@@ -531,13 +531,12 @@ class Project extends Base
$project_id = $this->project->create($values, $this->userSession->getId(), true);
- if ($project_id) {
+ if ($project_id > 0) {
$this->session->flash(t('Your project have been created successfully.'));
$this->response->redirect('?controller=project&action=show&project_id='.$project_id);
}
- else {
- $this->session->flashError(t('Unable to create your project.'));
- }
+
+ $this->session->flashError(t('Unable to create your project.'));
}
$this->create($values, $errors);