Skip to content

Commit 54f7d9c

Browse files
datibbawfabpot
authored andcommitted
Set cost type to integer
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).
1 parent 74dedff commit 54f7d9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Encoder/BCryptPasswordEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct($cost)
4242
throw new \InvalidArgumentException('Cost must be in the range of 4-31.');
4343
}
4444

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

4848
/**

0 commit comments

Comments
 (0)