I try to decrypt a password and when the password is correct it does not show an error, and if the password is incorrect it shows this: Notice: Undefined offset 1 in C: .... on line 11
public static function decrypt($data, $key) {
$encryption_key = base64_decode($key);
list($encrypted_data, $iv) = explode('::', base64_decode($data), 2);// ESTA ES LA LINEA 11
return openssl_decrypt($encrypted_data, 'RC4', $encryption_key, 0, $iv);
}