Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove code munging

- Per the comments, changing the code value if it fell outside the range of the
  defined constants does not change how isValid() works, and does not allow for
  custom constants in extending classes, unless you also override the
  constructor.
  • Loading branch information...
commit 67561171accefd1f34232ab1819edbc3fbd7a4a8 1 parent 5717ba8
@weierophinney authored
Showing with 1 addition and 9 deletions.
  1. +1 −9 library/Zend/Authentication/Result.php
View
10 library/Zend/Authentication/Result.php
@@ -73,15 +73,7 @@ class Result
*/
public function __construct($code, $identity, array $messages = array())
{
- $code = (int) $code;
-
- if ($code < self::FAILURE_UNCATEGORIZED) {
- $code = self::FAILURE;
- } elseif ($code > self::SUCCESS) {
- $code = self::SUCCESS;
- }
-
- $this->code = $code;
+ $this->code = (int) $code;
$this->identity = $identity;
$this->messages = $messages;
}
Please sign in to comment.
Something went wrong with that request. Please try again.