Skip to content

Commit 21ce093

Browse files
committed
1 parent 98cf389 commit 21ce093

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Serializer/Serializer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function normalize($data, string $format = null, array $context = [])
179179
throw new NotNormalizableValueException(sprintf('Could not normalize object of type "%s", no supporting normalizer found.', get_debug_type($data)));
180180
}
181181

182-
throw new NotNormalizableValueException('An unexpected value could not be normalized: '.(!\is_resource($data) ? var_export($data, true) : sprintf('%s resource', get_resource_type($data))));
182+
throw new NotNormalizableValueException('An unexpected value could not be normalized: '.(!\is_resource($data) ? var_export($data, true) : sprintf('"%s" resource', get_resource_type($data))));
183183
}
184184

185185
/**

src/Symfony/Component/Serializer/Tests/SerializerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ public function testExceptionWhenTypeIsNotInTheBodyToDeserialiaze()
487487
public function testNotNormalizableValueExceptionMessageForAResource()
488488
{
489489
$this->expectException(NotNormalizableValueException::class);
490-
$this->expectExceptionMessage('An unexpected value could not be normalized: stream resource');
490+
$this->expectExceptionMessage('An unexpected value could not be normalized: "stream" resource');
491491

492492
(new Serializer())->normalize(tmpfile());
493493
}

0 commit comments

Comments
 (0)