From 8423c004b94d9bb37839829ec88b95debd5a77db Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Thu, 7 Jan 2016 10:51:34 +0100 Subject: [PATCH] Invert condition to avoid else. --- lib/Cake/View/Helper/FormHelper.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index da064f30859..5129815a7ae 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -441,9 +441,8 @@ public function create($model = null, $options = array()) { } $this->requestType = strtolower($options['type']); - if ($options['action'] === false || $options['url'] === false) { - $action = null; - } else { + $action = null; + if ($options['action'] !== false && $options['url'] !== false) { $action = $this->url($options['action']); } unset($options['url']);