mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-30 17:58:39 +01:00
Trying to silence error if no algo/mode available (mcrypt problem)
This commit is contained in:
parent
ef2e7cd088
commit
17d994c883
@ -21,8 +21,10 @@
|
||||
{
|
||||
$config['mcrypt_algo'] = 'tripledes'; /* MCRYPT_TRIPLEDES */
|
||||
}
|
||||
$algos = mcrypt_list_algorithms();
|
||||
$algos = @mcrypt_list_algorithms();
|
||||
|
||||
if(@is_array($algos))
|
||||
{
|
||||
while (list ($key, $value) = each ($algos))
|
||||
{
|
||||
/* Only show each once - seems this is a problem in some installs */
|
||||
@ -44,6 +46,12 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Something is wrong with their mcrypt install or php.ini */
|
||||
$out = '<option value="tripledes">' . lang('no algorithms available') . '</option>' . "\n";;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$out = '<option value="tripledes">TRIPLEDES</option>' . "\n";;
|
||||
}
|
||||
@ -59,8 +67,10 @@
|
||||
{
|
||||
$config['mcrypt_mode'] = 'cbc'; /* MCRYPT_MODE_CBC */
|
||||
}
|
||||
$modes = mcrypt_list_modes();
|
||||
$modes = @mcrypt_list_modes();
|
||||
|
||||
if(@is_array($modes))
|
||||
{
|
||||
while (list ($key, $value) = each ($modes))
|
||||
{
|
||||
/* Only show each once - seems this is a problem in some installs */
|
||||
@ -82,6 +92,12 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Something is wrong with their mcrypt install or php.ini */
|
||||
$out = '<option value="cbc" selected>' . lang('no modes available') . '</option>' . "\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$out = '<option value="cbc" selected>CBC</option>' . "\n";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user