Infinite recursion on VM3.4.2 (Virtuemart bug)

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Infinite recursion on VM3.4.2 (Virtuemart bug)

Postby admin » Fri Oct 12, 2018 10:48 am

Hello friends, we just discovered a possible memory leak and infinite recursion bug on VM3.4.2 when handling 404 category pages in some cases.

we must had adjusted:
\components\com_virtuemart\views\category\view.html.php

original code:
Code: Select all
//No redirect here, for category id = 0 means show ALL categories! note by Max Milbers
      if ((!empty($this->categoryId) and $this->categoryId!==-1 ) and (empty($category->slug) or !$category->published)) {
          $this->handle404();
      }


with:
Code: Select all
//No redirect here, for category id = 0 means show ALL categories! note by Max Milbers
      if ((!empty($this->categoryId) and $this->categoryId!==-1 ) and (empty($category->slug) or !$category->published)) {
         static $wasHere;
         if (empty($wasHere)) {
          $wasHere = true;
          $this->handle404();
         }
      }


now the page simply says:
Category not found

which is better then waisting all available RAM of the server due to this.

best regards, stan
admin
Site Admin
 
Posts: 2666
Joined: Wed Jan 06, 2010 11:43 pm

Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron