Skip to content

Commit 1cbed0c

Browse files
committed
removed PHP < 7 support
1 parent f7aa271 commit 1cbed0c

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/Http/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public function getRemoteHost()
291291
*/
292292
public function getRawBody()
293293
{
294-
return $this->rawBodyCallback ? call_user_func($this->rawBodyCallback) : NULL;
294+
return $this->rawBodyCallback ? ($this->rawBodyCallback)() : NULL;
295295
}
296296

297297

src/Http/Url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public function getBaseUrl()
410410
*/
411411
public function getRelativeUrl()
412412
{
413-
return (string) substr($this->getAbsoluteUrl(), strlen($this->getBaseUrl()));
413+
return substr($this->getAbsoluteUrl(), strlen($this->getBaseUrl()));
414414
}
415415

416416

tests/Http/Response.setCookie.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ $response = new Http\Response;
2323

2424
$response->setCookie('test', 'value', 0);
2525
$headers = array_values(array_diff(headers_list(), $old, ['Set-Cookie:']));
26-
$headers = str_replace('HttpOnly', 'httponly', $headers);
2726
Assert::same([
28-
'Set-Cookie: test=value; path=/; httponly',
27+
'Set-Cookie: test=value; path=/; HttpOnly',
2928
], $headers);
3029

3130

3231
$response->setCookie('test', 'newvalue', 0);
3332
$headers = array_values(array_diff(headers_list(), $old, ['Set-Cookie:']));
34-
$headers = str_replace('HttpOnly', 'httponly', $headers);
3533
Assert::same([
36-
'Set-Cookie: test=newvalue; path=/; httponly',
34+
'Set-Cookie: test=newvalue; path=/; HttpOnly',
3735
], $headers);

0 commit comments

Comments
 (0)