Skip to content

Commit f8e7aa7

Browse files
author
Roger
committed
update code
1 parent 2f75d63 commit f8e7aa7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/code/Magento/PageCache/Model/App/Request/Http/IdentifierForSave.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838
*/
3939
public function getValue()
4040
{
41-
$url = $this->request->getUriString();
41+
$url = (string)$this->request->getUriString();
4242
list($baseUrl, $query) = $this->reconstructUrl($url);
4343
$data = [
4444
$this->request->isSecure(),
@@ -62,7 +62,7 @@ private function reconstructUrl(string $url): array
6262
if (empty($url)) {
6363
return [$url, ''];
6464
}
65-
$baseUrl = strtok((string)$url, '?');
65+
$baseUrl = strtok($url, '?');
6666
$query = $this->request->getUri()->getQueryAsArray();
6767
if (!empty($query)) {
6868
ksort($query);

lib/internal/Magento/Framework/App/PageCache/Identifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(
5050
*/
5151
public function getValue()
5252
{
53-
$url = $this->request->getUriString();
53+
$url = (string)$this->request->getUriString();
5454
list($baseUrl, $query) = $this->reconstructUrl($url);
5555
$data = [
5656
$this->request->isSecure(),
@@ -73,7 +73,7 @@ private function reconstructUrl(string $url): array
7373
if (empty($url)) {
7474
return [$url, ''];
7575
}
76-
$baseUrl = strtok((string)$url, '?');
76+
$baseUrl = strtok($url, '?');
7777
$query = $this->request->getUri()->getQueryAsArray();
7878
if (!empty($query)) {
7979
ksort($query);

0 commit comments

Comments
 (0)