Merge pull request #22 from JosephSilber/patch-2

Move comment to correct spot
This commit is contained in:
Tom committed 2015-05-06 07:23:37 -07:00
commit c55fda58b1
1 file changed
+3 -3
+3 -3
View File
@@ -358,9 +358,6 @@ class HtmlBuilder {
{
$html = array();
// For numeric keys we will assume that the key and the value are the same
// as this will convert HTML attributes such as "required" to a correct
// form like required="required" instead of using incorrect numerics.
foreach ((array) $attributes as $key => $value)
{
$element = $this->attributeElement($key, $value);
@@ -380,6 +377,9 @@ class HtmlBuilder {
*/
protected function attributeElement($key, $value)
{
// For numeric keys we will assume that the key and the value are the same
// as this will convert HTML attributes such as "required" to a correct
// form like required="required" instead of using incorrect numerics.
if (is_numeric($key)) $key = $value;
if ( ! is_null($value)) return $key.'="'.e($value).'"';