We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10fa264 commit acd39e4Copy full SHA for acd39e4
1 file changed
src/TgUtils/Request.php
@@ -230,13 +230,14 @@ public function getPostParam($key, $default = NULL) {
230
public function getPostParams() {
231
if ($this->postParams == NULL) {
232
$this->postParams = array();
233
- $headers = $this->headers;
234
// Check that we have content-length
235
- if (isset($headers['Content-Length'])) {
236
- $len = intval($headers['Content-Length']);
+ $len = $this->getHeader('Content-Length');
+ if ($len) {
+ $len = intval($len);
237
// Check that we have a valid content-length
238
if (($len>0) && ($len<10000)) {
239
$this->postParams = $_POST;
240
+ Log::debug('postParams', $this->postParams);
241
} else {
242
Log::registerMessage(new Error('POST content too big'));
243
}
0 commit comments