Fix PhpAnalyzer issues

This commit is contained in:
Frederic Guillot
2015-05-24 16:47:41 -04:00
parent 03fc8a1bce
commit 1a0465cb57
8 changed files with 20 additions and 14 deletions

View File

@@ -71,7 +71,7 @@ class Link extends Base
if ($valid) {
if ($this->link->create($values['label'], $values['opposite_label'])) {
if ($this->link->create($values['label'], $values['opposite_label']) !== false) {
$this->session->flash(t('Link added successfully.'));
$this->response->redirect($this->helper->url->to('link', 'index'));
}

View File

@@ -323,7 +323,7 @@ class Project extends Base
if ($this->request->getStringParam('duplicate') === 'yes') {
$values = array_keys($this->request->getValues());
if ($this->projectDuplication->duplicate($project['id'], $values)) {
if ($this->projectDuplication->duplicate($project['id'], $values) !== false) {
$this->session->flash(t('Project cloned successfully.'));
} else {
$this->session->flashError(t('Unable to clone this project.'));