From d39d915e03bb7c164239de60effa44623cd1dc84 Mon Sep 17 00:00:00 2001 From: coderkun Date: Thu, 1 May 2014 21:26:36 +0200 Subject: [PATCH] do not use empty() without write context --- controllers/UsersController.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/UsersController.inc b/controllers/UsersController.inc index ca5f0412..d7d5bd45 100644 --- a/controllers/UsersController.inc +++ b/controllers/UsersController.inc @@ -433,7 +433,8 @@ if($this->Users->usernameExists($username, $user['id'])) { $validation = $this->Validation->addValidationResult($validation, 'username', 'exist', true); } - if(!empty($this->request->getPostParam('password'))) { + $password = $this->request->getPostParam('password'); + if(!empty($password)) { $validation = $this->Validation->addValidationResults($validation, 'password', $this->Validation->validateParam(