Mercurial > hg > cmmr2012-drupal-site
diff vendor/zendframework/zend-diactoros/src/ServerRequest.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | 5311817fb629 |
children |
line wrap: on
line diff
--- a/vendor/zendframework/zend-diactoros/src/ServerRequest.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/zendframework/zend-diactoros/src/ServerRequest.php Thu Feb 28 13:11:55 2019 +0000 @@ -180,6 +180,14 @@ */ public function withParsedBody($data) { + if (! is_array($data) && ! is_object($data) && null !== $data) { + throw new InvalidArgumentException(sprintf( + '%s expects a null, array, or object argument; received %s', + __METHOD__, + gettype($data) + )); + } + $new = clone $this; $new->parsedBody = $data; return $new;