Commit c1d883d3 authored by Mike Meier's avatar Mike Meier Committed by Benjamin Eberlei

Update lib/Doctrine/DBAL/Types/BlobType.php

If allow_url_fopen isnt enabled, fopen will return false.
parent 4f535bb4
......@@ -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