Skip to content

Commit a6538ff

Browse files
committed
MAGETWO-66049: Remove usages of unserialize in Magento/Framework/Url
1 parent f7a5452 commit a6538ff

File tree

1 file changed

+7
-5
lines changed
  • lib/internal/Magento/Framework

1 file changed

+7
-5
lines changed

lib/internal/Magento/Framework/Url.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -835,12 +835,14 @@ public function getUrl($routePath = null, $routeParams = null)
835835
$isArray = is_array($routeParams);
836836

837837
if ($isArray) {
838-
foreach ($routeParams as $item) {
839-
if (is_object($item)) {
840-
$isCached = false;
841-
break;
838+
array_walk_recursive(
839+
$routeParams,
840+
function ($item) use (&$isCached) {
841+
if (is_object($item)) {
842+
$isCached = false;
843+
}
842844
}
843-
}
845+
);
844846
}
845847

846848
if(!$isCached) {

0 commit comments

Comments
 (0)