1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-07 17:42:53 +03:00

functions.inc.php:

- PHP around 5.3.8 includes hex2bin as native function - http://php.net/hex2bin
  therefore we have to wrap our function (which fortunately gives the same
  results) with function_exists().
  Reported by MadOtis on #postfixadmin



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1328 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2012-01-11 18:40:58 +00:00
parent cb640c87c1
commit 19b9535e43

View File

@@ -1252,6 +1252,7 @@ function create_salt () {
return $salt; return $salt;
} }
/**/ if (!function_exists('hex2bin')) { # PHP around 5.3.8 includes hex2bin as native function - http://php.net/hex2bin
function hex2bin ($str) { function hex2bin ($str) {
$len = strlen ($str); $len = strlen ($str);
$nstr = ""; $nstr = "";
@@ -1261,6 +1262,7 @@ function hex2bin ($str) {
} }
return $nstr; return $nstr;
} }
/**/ }
function to64 ($v, $n) { function to64 ($v, $n) {
$ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; $ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";