Commit 3d82e0de authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #54 from iBiryukov/master

Fix for ConversionException throw when the value is empty
parents 4ae13fac 869cb960
...@@ -38,10 +38,11 @@ class ArrayType extends Type ...@@ -38,10 +38,11 @@ class ArrayType extends Type
public function convertToPHPValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform) public function convertToPHPValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
{ {
if ($value === null) { if (empty($value)) {
return null; return array();
} }
$value = (is_resource($value)) ? stream_get_contents($value) : $value; $value = (is_resource($value)) ? stream_get_contents($value) : $value;
$val = unserialize($value); $val = unserialize($value);
if ($val === false && $value != 'b:0;') { if ($val === false && $value != 'b:0;') {
......
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