From d60276e86421927896c12e40e1d05acacc8959a1 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 11 Jan 2012 18:45:10 +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/branches/postfixadmin-2.3@1329 a1433add-5e2c-0410-b055-b7f2511e0802 --- CHANGELOG.TXT | 1 + functions.inc.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index c66a867d..d848233f 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -24,6 +24,7 @@ SVN changes since 2.3.4 release (postfixadmin-2.3 branch) - create-domain: fix SQL injection (only exploitable by superadmins) - add missing $LANG['pAdminDelete_admin_error'] - don't mark mailbox targets with recipient delimiter as "forward only" + - wrap hex2bin with function_exists() - PHP 5.3.8 has it as native function Version 2.3.4 - 2011/09/16 - SVN r1180 (postfixadmin-2.3 branch) ---------------------------------------------------------------- diff --git a/functions.inc.php b/functions.inc.php index f36b00b7..f76a7c8f 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1356,6 +1356,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); @@ -1367,6 +1368,7 @@ function hex2bin ($str) } return $nstr; } +/**/ } function to64 ($v, $n) {