Browse Source

Use array_key_exists in validator.

Taylor Otwell 11 years ago
parent
commit
28a880b5b5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      laravel/validator.php

+ 2 - 2
laravel/validator.php

@@ -317,7 +317,7 @@ class Validator {
 	{
 		$other = $parameters[0];
 
-		return isset($this->attributes[$other]) and $value == $this->attributes[$other];
+		return array_key_exists($other, $this->attributes) and $value == $this->attributes[$other];
 	}
 
 	/**
@@ -332,7 +332,7 @@ class Validator {
 	{
 		$other = $parameters[0];
 
-		return isset($this->attributes[$other]) and $value != $this->attributes[$other];
+		return array_key_exists($other, $this->attributes) and $value != $this->attributes[$other];
 	}
 
 	/**