Skip to content

Commit

Permalink
Set cost type to integer
Browse files Browse the repository at this point in the history
This seems to be a remnant of when the code dealt with crypt() directly. The password_hash() function expects the cost option to be an LVAL (it does a type conversion for strings).
  • Loading branch information
datibbaw authored and fabpot committed Sep 27, 2013
1 parent 9a65ce3 commit 8753db9
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -42,7 +42,7 @@ public function __construct($cost)
throw new \InvalidArgumentException('Cost must be in the range of 4-31.');
}

$this->cost = sprintf('%02d', $cost);
$this->cost = $cost;
}

/**
Expand Down

0 comments on commit 8753db9

Please sign in to comment.