From: tokul Date: Mon, 6 Sep 2004 08:52:14 +0000 (+0000) Subject: fixed function_exist test and used newer mcrypt functions. If squirrelmail X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1c2a03c323bde0cf0e1d3fb88d084d34c18b6335;p=squirrelmail.git fixed function_exist test and used newer mcrypt functions. If squirrelmail minimal requirements are 4.1.2, function test can be removed. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8018 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/squirrelspell/sqspell_functions.php b/plugins/squirrelspell/sqspell_functions.php index e931496c..ee9c1266 100644 --- a/plugins/squirrelspell/sqspell_functions.php +++ b/plugins/squirrelspell/sqspell_functions.php @@ -151,7 +151,7 @@ function sqspell_crypto($mode, $ckey, $input){ * Double-check if we have the mcrypt_generic function. Bail out if * not so. */ - if (!function_exists(mcrypt_generic)) { + if (!function_exists('mcrypt_generic')) { return 'PANIC'; } /** @@ -183,7 +183,14 @@ function sqspell_crypto($mode, $ckey, $input){ /** * Finish up the mcrypt routines and return the processed content. */ - mcrypt_generic_end ($td); + if (function_exists('mcrypt_generic_deinit')) { + // php 4.1.1+ syntax + mcrypt_generic_deinit ($td); + mcrypt_module_close ($td); + } else { + // older depreciated function + mcrypt_generic_end ($td); + } return $crypto; }