fixing bugs in validator and file classes.

This commit is contained in:
Taylor Otwell
2011-11-15 19:32:32 -06:00
parent e226a463bf
commit a6641130c4
2 changed files with 6 additions and 5 deletions

View File

@@ -225,9 +225,7 @@ class Validator {
{
$confirmed = $attribute.'_confirmation';
$confirmation = $this->attributes[$confirmed];
return array_key_exists($confirmed, $this->attributes) and $value == $confirmation;
return isset($this->attributes[$confirmed]) and $value == $this->attributes[$confirmed];
}
/**
@@ -241,7 +239,7 @@ class Validator {
*/
protected function validate_accepted($attribute, $value)
{
return $this->validate_required($attribute) and ($value == 'yes' or $value == '1');
return $this->validate_required($attribute, $value) and ($value == 'yes' or $value == '1');
}
/**