aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-20 19:11:34 -0700
committerFriendika <info@friendika.com>2011-10-20 19:11:34 -0700
commitd1833cabf67b35a10a676d69a1e45fe7aadc31bc (patch)
tree27c0fce20f1d174c7425883b8474a10229d85313 /include
parent01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a (diff)
downloadvolse-hubzilla-d1833cabf67b35a10a676d69a1e45fe7aadc31bc.tar.gz
volse-hubzilla-d1833cabf67b35a10a676d69a1e45fe7aadc31bc.tar.bz2
volse-hubzilla-d1833cabf67b35a10a676d69a1e45fe7aadc31bc.zip
fix hex2bin for empty input
Diffstat (limited to 'include')
-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);