Skip to content

Commit 0d09eb8

Browse files
WyriHaximusclue
authored andcommitted
Don't throw, but return raw max post size instead
1 parent 9000e60 commit 0d09eb8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Middleware/RequestBodyBuffer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ public function __invoke(ServerRequestInterface $request, $stack)
6060
* is considered out of range.
6161
*
6262
* @return int
63-
*
64-
* @throws \UnexpectedValueException on invalid post_max_size value.
6563
*/
6664
private function iniMaxPostSize()
6765
{
@@ -77,6 +75,6 @@ private function iniMaxPostSize()
7775
return substr($size, 0, -1) * 1024 * 1024 * 1024;
7876
}
7977

80-
throw new \UnexpectedValueException('post_max_size value is out of range.');
78+
return $size;
8179
}
8280
}

0 commit comments

Comments
 (0)