diff --git a/catalog/includes/functions/general.php b/catalog/includes/functions/general.php index c245d0d4a..c83ed64f9 100644 --- a/catalog/includes/functions/general.php +++ b/catalog/includes/functions/general.php @@ -1295,15 +1295,7 @@ function tep_parse_category_path($cPath) { }, explode('_', $cPath)); // make sure no duplicate category IDs exist which could lock the server in a loop - $tmp_array = array(); - $n = sizeof($cPath_array); - for ($i=0; $i<$n; $i++) { - if (!in_array($cPath_array[$i], $tmp_array)) { - $tmp_array[] = $cPath_array[$i]; - } - } - - return $tmp_array; + return array_keys(array_flip($cPath_array)); } ////