Commit 587b5510 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DBAL-388' into 2.3

parents 4f535bb4 c1d883d3
...@@ -47,11 +47,15 @@ class BlobType extends Type ...@@ -47,11 +47,15 @@ class BlobType extends Type
if (null === $value) { if (null === $value) {
return null; return null;
} }
if (is_string($value)) { if (is_string($value)) {
$value = fopen('data://text/plain;base64,' . base64_encode($value), 'r'); $value = fopen('data://text/plain;base64,' . base64_encode($value), 'r');
} else if ( ! is_resource($value)) { }
if ( ! is_resource($value)) {
throw ConversionException::conversionFailed($value, self::BLOB); throw ConversionException::conversionFailed($value, self::BLOB);
} }
return $value; return $value;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment