Mercurial > hg > isophonics-drupal-site
diff vendor/zendframework/zend-diactoros/src/ServerRequest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children |
line wrap: on
line diff
--- a/vendor/zendframework/zend-diactoros/src/ServerRequest.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/zendframework/zend-diactoros/src/ServerRequest.php Thu Feb 28 13:21:36 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;