Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6 from gardiner/bugfixes

Small bugfixes
  • Loading branch information...
commit 689658e9a095cff999c490815c90bbdf5967b00f 2 parents 0ca044c + ff54c15
@jordanlev authored
View
4 Phorm/Field/Hidden.class.php
@@ -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 '';
}
@@ -39,7 +39,7 @@ public function label()
*
* @return string an empty string.
*/
- public function help_text()
+ public function help_text($text='')
{
return '';
}
View
2  Phorm/Field/Integer.class.php
@@ -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');
}
View
2  Phorm/Widget.class.php
@@ -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);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.