Commit 487c506b authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge pull request #231 from mikemeier/patch-1

Update lib/Doctrine/DBAL/Types/BlobType.php
parents 17a74173 cd2117ac
......@@ -47,11 +47,15 @@ class BlobType extends Type
if (null === $value) {
return null;
}
if (is_string($value)) {
$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);
}
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