Commit 4ff4d515 authored by Henrik Westphal's avatar Henrik Westphal Committed by Benjamin Eberlei

Allow NULL value when converting a blob to PHP value.

parent e11164af
......@@ -44,7 +44,9 @@ class BlobType extends Type
*/
public function convertToPHPValue($value, AbstractPlatform $platform)
{
if (is_string($value)) {
if (null === $value) {
return null;
} else if (is_string($value)) {
$value = fopen('data://text/plain;base64,' . base64_encode($value), 'r');
} else if ( ! is_resource($value)) {
throw ConversionException::conversionFailed($value, self::BLOB);
......
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