File tree 1 file changed +6
-1
lines changed
app/code/Magento/Store/Model 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1164,11 +1164,12 @@ public function isDefault()
1164
1164
* Retrieve current url for store
1165
1165
*
1166
1166
* @param bool $fromStore
1167
+ * @param bool $clearUrl
1167
1168
* @return string
1168
1169
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
1169
1170
* @SuppressWarnings(PHPMD.NPathComplexity)
1170
1171
*/
1171
- public function getCurrentUrl ($ fromStore = true )
1172
+ public function getCurrentUrl ($ fromStore = true , $ clearUrl = false )
1172
1173
{
1173
1174
$ sidQueryParam = $ this ->_sidResolver ->getSessionIdQueryParam ($ this ->_getSession ());
1174
1175
$ requestString = $ this ->_url ->escape (ltrim ($ this ->_request ->getRequestString (), '/ ' ));
@@ -1217,6 +1218,10 @@ public function getCurrentUrl($fromStore = true)
1217
1218
1218
1219
$ currentUrlQueryParams = array_merge ($ requestString , $ storeParsedQuery );
1219
1220
1221
+ if ($ clearUrl !== false ) {
1222
+ $ currentUrlQueryParams = false ;
1223
+ }
1224
+
1220
1225
$ currentUrl = $ storeParsedUrl ['scheme ' ]
1221
1226
. ':// '
1222
1227
. $ storeParsedUrl ['host ' ]
You can’t perform that action at this time.
0 commit comments