From 2daa5e9135b727f833841e6d589a3d542f60c51f Mon Sep 17 00:00:00 2001 From: KiTE Date: Mon, 6 Jan 2014 06:09:43 +0200 Subject: [PATCH] Fixed label attributes in BaseHtml --- framework/yii/helpers/BaseHtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/helpers/BaseHtml.php b/framework/yii/helpers/BaseHtml.php index b3a88c1..6d761c0 100644 --- a/framework/yii/helpers/BaseHtml.php +++ b/framework/yii/helpers/BaseHtml.php @@ -961,9 +961,9 @@ class BaseHtml */ public static function activeLabel($model, $attribute, $options = []) { + $for = array_key_exists('for', $options) ? $options['for'] : static::getInputId($model, $attribute); $attribute = static::getAttributeName($attribute); $label = isset($options['label']) ? $options['label'] : static::encode($model->getAttributeLabel($attribute)); - $for = array_key_exists('for', $options) ? $options['for'] : static::getInputId($model, $attribute); unset($options['label'], $options['for']); return static::label($label, $for, $options); }