Skip to content

Commit 39a9c16

Browse files
dantleechfabpot
authored andcommitted
Enforce sprintf for exceptions
1 parent 287a2d3 commit 39a9c16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public function send()
355355
public function setContent($content)
356356
{
357357
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) {
358-
throw new \UnexpectedValueException('The Response content must be a string or object implementing __toString(), "'.gettype($content).'" given.');
358+
throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content)));
359359
}
360360

361361
$this->content = (string) $content;

0 commit comments

Comments
 (0)