little fixes of hopefully nil significance

This commit is contained in:
friendica
2014-03-16 20:34:21 -07:00
parent 6f9fde997b
commit ecb2e52a74
6 changed files with 19 additions and 18 deletions

View File

@@ -278,6 +278,11 @@ function hex2bin($s) {
if(! (is_string($s) && strlen($s)))
return '';
if(strlen($s) & 1) {
logger('hex2bin: illegal hex string: ' . $s);
return $s;
}
if(! ctype_xdigit($s)) {
return($s);
}