Skip to content

Commit

Permalink
getHeader returns string or null
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed May 20, 2020
1 parent b87fc4f commit 392fbfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/AppFramework/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public function __unset($id) {
* This method returns null if the header did not exist.
*
* @param string $name
* @return string
* @return string|null
*/
public function getHeader($name) {
$name = \strtoupper(\str_replace(['-'], ['_'], $name));
Expand Down Expand Up @@ -388,7 +388,7 @@ public function getCookie($key) {
protected function getContent() {
// If the content can't be parsed into an array then return a stream resource.
if ($this->method === 'PUT'
&& $this->getHeader('Content-Length') !== 0
&& $this->getHeader('Content-Length') !== '0'
&& $this->getHeader('Content-Length') !== null
&& \strpos($this->getHeader('Content-Type'), 'application/x-www-form-urlencoded') === false
&& \strpos($this->getHeader('Content-Type'), 'application/json') === false
Expand Down

0 comments on commit 392fbfa

Please sign in to comment.