Changeset 5948
- Timestamp:
- 01/18/12 19:24:15 (4 months ago)
- File:
-
- 1 edited
-
trunk/core/viewhelper/form/formelement.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/viewhelper/form/formelement.php
r5934 r5948 416 416 { 417 417 /** 418 * attributes are directly set 419 * one might even set a wrong one by accident, like $attribute = 'maxxxlength' 420 * protect the developer a little bit more here. 421 * @todo check if attribute is allowed, lookup in whitelist 422 * @todo protect formelement attr and use setters 418 * In DEBUG mode the attributes are set via a setter method. 419 * So one might even set a wrong one by accident, like $attribute = 'maxxxlength'. 420 * To protect the developer a bit more, we are focing the usage of a setter method. 421 * If the setter method exists most likely the property will exist too, i guess. 423 422 */ 424 425 # set attribute directly 426 $this->{$attribute} = $value; 423 if(DEBUG == true) 424 { 425 $method = 'set' . $attribute; 426 $this->{$method}($value); 427 } 428 else # while in production mode 429 { 430 # set attribute directly 431 $this->{$attribute} = $value; 432 } 427 433 } 428 434 }
Note: See TracChangeset
for help on using the changeset viewer.
