pungpoo / giix

Automatically exported from code.google.com/p/giix
0 stars 0 forks source link

GxHTML (43) Undefined variable: uncheck #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Undefined variable: uncheck

C:\wamp\www\web\OLAD\olad\OLAD\protected\extensions\giix-components\GxHtml.php(4
3)

31      * @param array $htmlOptions addtional HTML options.
32      * @return string the generated check box list
33      */
34     public static function activeCheckBoxList($model, $attribute, $data, 
$htmlOptions = array()) {
35         self::resolveNameID($model, $attribute, $htmlOptions);
36         $selection = self::selectData(self::resolveValue($model, 
$attribute)); // #Change: Added support to HAS_MANY and MANY_MANY relations.
37         if ($model->hasErrors($attribute))
38             self::addErrorCss($htmlOptions);
39         $name = $htmlOptions['name'];
40         unset($htmlOptions['name']);
41 
42         $hiddenOptions = isset($htmlOptions['id']) ? array('id' => 
self::ID_PREFIX . $htmlOptions['id']) : array('id' => false);
43         $hidden = $uncheck !== null ? self::hiddenField($name, $uncheck, 
$hiddenOptions) : '';
44 
45         return $hidden . self::checkBoxList($name, $selection, $data, 
$htmlOptions);
46     }

Original issue reported on code.google.com by evangeli...@gmail.com on 17 May 2011 at 10:10

GoogleCodeExporter commented 8 years ago
Correction based on CHTML::activeCheckBoxList (1477) : 
http://code.google.com/p/yii/source/browse/tags/1.1.7/framework/web/helpers/CHtm
l.php#1477

        if(array_key_exists('uncheckValue',$htmlOptions)) {
            $uncheck=$htmlOptions['uncheckValue'];
            unset($htmlOptions['uncheckValue']);
        } else
            $uncheck='0';

Original comment by evangeli...@gmail.com on 17 May 2011 at 10:18

GoogleCodeExporter commented 8 years ago
Thanks for checking the trunk code out!

This was introduced by r104.
http://code.google.com/p/giix/source/browse/trunk/giix-components/GxHtml.php#43

Original comment by rodrigo.coelho@gmail.com on 17 May 2011 at 6:26

GoogleCodeExporter commented 8 years ago
Issue 15 has been merged into this issue.

Original comment by rodrigo.coelho@gmail.com on 27 May 2011 at 9:17

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r110.

Original comment by rodrigo.coelho@gmail.com on 2 Jun 2011 at 1:01