diff --git a/api.php b/api.php index 58a6c95..3ba9348 100644 --- a/api.php +++ b/api.php @@ -1814,7 +1814,7 @@ class PHP_CRUD_API { $values[$i] = $v + 0; } else if ($this->db->isBinaryType($fields[$i])) { - $values[$i] = base64_encode(hex2bin($v)); + $values[$i] = base64_encode(pack("H*",$v)); } else if ($this->db->isJsonType($fields[$i])) { $values[$i] = $this->db->jsonDecode($v);