From 33990b2193fe3723ddb60676cc3bc39edd4879c8 Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 14 Jan 2007 05:46:03 +0000 Subject: [PATCH] Adding FormHelper::input() fix for generating select menus (Ticket #1860) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4293 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/view/helpers/form.php | 4 ++-- cake/libs/view/helpers/xml.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cake/libs/view/helpers/form.php b/cake/libs/view/helpers/form.php index c691760cc..6dca45f96 100644 --- a/cake/libs/view/helpers/form.php +++ b/cake/libs/view/helpers/form.php @@ -260,7 +260,7 @@ class FormHelper extends AppHelper { $this->setFormTag($tagName); - if (!isset($options['type']) || ($options['type'] == 'select' && !isset($options['options']))) { + if ((!isset($options['type']) || $options['type'] == 'select') && !isset($options['options'])) { if (ClassRegistry::isKeySet($this->model())) { $model =& ClassRegistry::getObject($this->model()); @@ -354,7 +354,7 @@ class FormHelper extends AppHelper { if(isset($options['rows']) || isset($options['cols'])) { $options['type'] = 'textarea'; } - + $empty = false; if(isset($options['empty'])) { $empty = $options['empty']; diff --git a/cake/libs/view/helpers/xml.php b/cake/libs/view/helpers/xml.php index 0a9c47ef4..be7bc01b1 100644 --- a/cake/libs/view/helpers/xml.php +++ b/cake/libs/view/helpers/xml.php @@ -168,7 +168,7 @@ class XmlHelper extends AppHelper { } $out = "<{$ns}{$name}" . $this->__composeAttributes($attrib); - if ((empty($content) || $content == null) && $endTag) { + if (empty($content) && $endTag) { $out .= ' />'; } else { $out .= '>' . $this->__composeContent($content);