mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-20 10:27:18 +08:00
fixes #1303: Security::decrypt now returns null w/o error when null is passed as $data
This commit is contained in:
@ -75,6 +75,9 @@ class BaseSecurity
|
||||
*/
|
||||
public static function decrypt($data, $password)
|
||||
{
|
||||
if ($data === null) {
|
||||
return null;
|
||||
}
|
||||
$module = static::openCryptModule();
|
||||
$ivSize = mcrypt_enc_get_iv_size($module);
|
||||
$iv = StringHelper::substr($data, 0, $ivSize);
|
||||
|
Reference in New Issue
Block a user