From: Friendika Date: Fri, 21 Oct 2011 02:11:34 +0000 (-0700) Subject: fix hex2bin for empty input X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d1833cabf67b35a10a676d69a1e45fe7aadc31bc;p=friendica.git fix hex2bin for empty input --- diff --git a/include/text.php b/include/text.php index 299410a63d..ca8dc5ac3b 100644 --- a/include/text.php +++ b/include/text.php @@ -195,6 +195,9 @@ function unxmlify($s) { if(! function_exists('hex2bin')) { function hex2bin($s) { + if(! (is_string($s) && strlen($s))) + return ''; + if(! ctype_xdigit($s)) { logger('hex2bin: illegal input: ' . print_r(debug_backtrace(), true)); return($s);