Commit 687e197a authored by Benjamin Eberlei's avatar Benjamin Eberlei

DBAL-22 Change check for array and object values into strict false check...

DBAL-22 Change check for array and object values into strict false check instead of using is_array and is_object
parent 2cc1cdc5
......@@ -42,7 +42,7 @@ class ArrayType extends Type
{
$value = (is_resource($value)) ? stream_get_contents($value) : $value;
$val = unserialize($value);
if (!is_array($val)) {
if ($val === false) {
throw ConversionException::conversionFailed($value, $this->getName());
}
return $val;
......
......@@ -23,7 +23,7 @@ class ObjectType extends Type
{
$value = (is_resource($value)) ? stream_get_contents($value) : $value;
$val = unserialize($value);
if (!is_object($val)) {
if ($val === false) {
throw ConversionException::conversionFailed($value, $this->getName());
}
return $val;
......
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