aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/text.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 299410a63..ca8dc5ac3 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);