From 19b9535e43d831e3da13e4e1908d610f9c63edad Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 11 Jan 2012 18:40:58 +0000 Subject: [PATCH] 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 --- functions.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions.inc.php b/functions.inc.php index 12e179d3..fb0e33f5 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1252,6 +1252,7 @@ function create_salt () { return $salt; } +/**/ if (!function_exists('hex2bin')) { # PHP around 5.3.8 includes hex2bin as native function - http://php.net/hex2bin function hex2bin ($str) { $len = strlen ($str); $nstr = ""; @@ -1261,6 +1262,7 @@ function hex2bin ($str) { } return $nstr; } +/**/ } function to64 ($v, $n) { $ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";