From bf169305a774b14c3edec247bdb8d2102332a14a Mon Sep 17 00:00:00 2001 From: coderkun Date: Thu, 24 Apr 2014 12:38:52 +0200 Subject: [PATCH] do not use empty() without write-context --- controllers/CharactersController.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/CharactersController.inc b/controllers/CharactersController.inc index 47418794..a50a2663 100644 --- a/controllers/CharactersController.inc +++ b/controllers/CharactersController.inc @@ -291,7 +291,7 @@ // Do action $selectedCharacters = array(); - if($this->request->getRequestMethod() == 'POST' && !empty($this->request->getPostParam('actions')) && !empty($this->request->getPostParam('characters'))) + if($this->request->getRequestMethod() == 'POST' && !is_null($this->request->getPostParam('actions')) && count($this->request->getPostParam('actions')) > 0 && !is_null($this->request->getPostParam('characters')) && count($this->request->getPostParam('characters')) > 0) { $actions = $this->request->getPostParam('actions'); $action = array_keys($actions)[0];