Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 770bd8c

Browse files
[Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()
1 parent 7beea17 commit 770bd8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public function encodePassword($raw, $salt)
7171
$options = array('cost' => $this->cost);
7272

7373
if ($salt) {
74+
@trigger_error('Passing a $salt to '.__METHOD__.'() is deprecated since version 2.8 and will be ignored in 3.0.', E_USER_DEPRECATED);
75+
7476
$options['salt'] = $salt;
7577
}
7678

0 commit comments

Comments
 (0)