# HG changeset patch # User Dan Fuhry # Date 1322806555 18000 # Node ID 12c23b83c79d5518db19fd1bbea94b1fb6136971 # Parent eecde44145eb45f828e3fedc4e855b23a6c1bb6e Conditionally declare hex2bin() due to a function of the same name being introduced in PHP 5.4 diff -r eecde44145eb -r 12c23b83c79d includes/functions.php --- a/includes/functions.php Sun Sep 18 02:13:34 2011 -0400 +++ b/includes/functions.php Fri Dec 02 01:15:55 2011 -0500 @@ -1535,20 +1535,24 @@ return $ret; } -/** - * Converts a hexadecimal number to a binary string. - * @param text string hexadecimal number - * @return string - */ -function hex2bin($text) +if ( !function_exists('hex2bin') ) { - $arr = enano_str_split($text, 2); - $ret = ''; - for ($i=0; $i