File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
lib/internal/Magento/Framework/App/PageCache Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -106,14 +106,22 @@ private function reconstructUrl(string $url): array
106106 if (empty ($ url )) {
107107 return [$ url , '' ];
108108 }
109+
109110 $ baseUrl = strtok ($ url , '? ' );
110- $ query = $ this ->request ->getUri ()->getQueryAsArray ();
111- if (!empty ($ query )) {
112- ksort ($ query );
113- $ query = http_build_query ($ query );
111+ $ queryString = parse_url ($ url , PHP_URL_QUERY ) ?? '' ;
112+
113+ $ queryArray = [];
114+ if ($ queryString !== '' ) {
115+ parse_str ($ queryString , $ queryArray );
116+ }
117+
118+ if (!empty ($ queryArray )) {
119+ ksort ($ queryArray );
120+ $ query = http_build_query ($ queryArray );
114121 } else {
115122 $ query = '' ;
116123 }
124+
117125 return [$ baseUrl , $ query ];
118126 }
119127}
You can’t perform that action at this time.
0 commit comments