Ticket #552 (closed Bug: fixed)
Forge module : checkbox bug
| Reported by: | bakura | Owned by: | Shadowhand |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.1.2 |
| Component: | Modules:Forge | Version: | 2.1 Release |
| Keywords: | Cc: |
Description
required validation rule failed !
cause change made to the Form_Input.php line 523:
protected function rule_required() {
if ($this->value === OR $this->value === NULL) {
$this->errorsrequired? = TRUE;
}
}
without updating the corresponding code in the Form_Checkbox line 29
public function get($key) {
if ($key == 'value') {
// Return the value if the checkbox is checked return $this->datachecked? ? $this->datavalue? : FALSE;
}
return parent::get($key);
}
the magic method return FALSE when a checkbox isn't checked... wich mean the rule_required will now always success !!!
should update line 29 with:
