Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r3215 -r3220 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3215) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3220) @@ -377,12 +377,15 @@ $category_found = end($category_stack); if($category_found) $url_part = array_shift($url_parts); - }while ($category_found); + }while ($category_found && $url_part); if( count($category_stack) >= 2 ) { - array_pop($category_stack); // remove last not found category - $category_id = array_pop($category_stack); + $category_id = array_pop($category_stack); // remove last not found category + if($category_id === false) + { + $category_id = array_pop($category_stack); + } if($category_id) { $this->Set('m_cat_id', $category_id);