Skip to content

Commit 12b4b4b

Browse files
author
anas-srikou
committed
Encode binary data using base64
1 parent 78127d3 commit 12b4b4b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Components/Schema.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,6 +1976,9 @@ public function typecastToClient($value, $field_info, $allow_null = true)
19761976

19771977
$type = strtolower(strval($type));
19781978
switch ($type) {
1979+
// Convert the binary data into a base64 encoded string so we can json encode it later for the response
1980+
case DbSimpleTypes::TYPE_BINARY:
1981+
return base64_encode($value);
19791982
// special handling for datetime types
19801983
case DbSimpleTypes::TYPE_DATE:
19811984
case DbSimpleTypes::TYPE_DATETIME:

0 commit comments

Comments
 (0)