work around a warning, if database password contains a non-ascii char (eg. German umlaut)

This commit is contained in:
Ralf Becker 2012-10-23 08:20:54 +00:00
parent a6190a6933
commit 3102a26a57

View File

@ -380,7 +380,7 @@ class etemplate_request
mcrypt_create_iv ($iv_size, MCRYPT_RAND) : substr($GLOBALS['egw_info']['server']['mcrypt_iv'],0,$iv_size);
$key_size = mcrypt_enc_get_key_size(self::$mcrypt);
if (strlen($key) > $key_size) $key = substr($key,0,$key_size-1);
if (bytes($key) > $key_size) $key = cut_bytes($key,0,$key_size-1);
if (mcrypt_generic_init(self::$mcrypt,$key, $iv) < 0)
{