Skip to content

Commit

Permalink
Merge pull request #6 from gardiner/bugfixes
Browse files Browse the repository at this point in the history
Small bugfixes
  • Loading branch information
jordanlev committed Mar 29, 2012
2 parents 0ca044c + ff54c15 commit 689658e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Phorm/Field/Hidden.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(array $validators=array(), array $attributes=array()
*
* @return string an empty string
*/
public function label()
public function label($tag=TRUE)
{
return '';
}
Expand All @@ -39,7 +39,7 @@ public function label()
*
* @return string an empty string.
*/
public function help_text()
public function help_text($text='')
{
return '';
}
Expand Down
2 changes: 1 addition & 1 deletion Phorm/Field/Integer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function get_widget()
*/
public function validate($value)
{
if( !filter_var($value,FILTER_VALIDATE_INT) )
if( !filter_var($value,FILTER_VALIDATE_INT) && filter_var($value, FILTER_VALIDATE_INT) !== 0 )
{
throw new Phorm_ValidationError('field_invalid_integer');
}
Expand Down
2 changes: 1 addition & 1 deletion Phorm/Widget.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function html($value, array $attributes=array())
$attributes[$this->clean_string($key)] = $this->clean_string($val);
}

return $this->serialize($this->clean_string($value), $attributes);
return $this->serialize($value, $attributes);
}

}

0 comments on commit 689658e

Please sign in to comment.