File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
lib/internal/Magento/Framework Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -835,14 +835,12 @@ public function getUrl($routePath = null, $routeParams = null)
835
835
$ isArray = is_array ($ routeParams );
836
836
837
837
if ($ isArray ) {
838
- array_walk_recursive (
839
- $ routeParams ,
840
- function ($ item ) use (&$ isCached ) {
841
- if (is_object ($ item )) {
842
- $ isCached = false ;
843
- }
838
+ foreach ($ routeParams as $ item ) {
839
+ if (is_object ($ item )) {
840
+ $ isCached = false ;
841
+ break ;
844
842
}
845
- );
843
+ }
846
844
}
847
845
848
846
if (!$ isCached ) {
@@ -851,12 +849,12 @@ function ($item) use (&$isCached) {
851
849
);
852
850
}
853
851
854
- $ cashedParams = $ routeParams ;
852
+ $ cachedParams = $ routeParams ;
855
853
if ($ isArray ) {
856
- ksort ($ cashedParams );
854
+ ksort ($ cachedParams );
857
855
}
858
856
859
- $ cacheKey = md5 ($ routePath . serialize ( $ cashedParams ));
857
+ $ cacheKey = md5 ($ routePath . json_encode ( $ cachedParams ));
860
858
if (!isset ($ this ->cacheUrl [$ cacheKey ])) {
861
859
$ this ->cacheUrl [$ cacheKey ] = $ this ->getUrlModifier ()->execute (
862
860
$ this ->createUrl ($ routePath , $ routeParams )
You can’t perform that action at this time.
0 commit comments