Jump to content

Warning: Missing argument 3


Recommended Posts

Ive searched around, and the only fix i could find was to hide the issue... :P But i want to fix it for real.

 

I get this Warning on my site when submiting the contact-form:

 

Warning: Missing argument 3 for blocktopmenu::getCategory(), called in /var/www/XXX/XXXX/XXX/modules/blocktopmenu/blocktopmenu.php on line 436 and defined in /var/www/XXX/XXXX/XXXX/modules/blocktopmenu/blocktopmenu.php on line 417

 

Lines written with //Line 4xx at the end of the "trouble" lines in the ode below:

 

 private function getCategory($id_category, $id_lang, $last)		  //Line 417
 {
   global $page_name;
   $categorie = new Category($id_category, $id_lang);
   if(is_null($categorie->id))
  return;
   $selected = ($page_name == 'category' && ((int)Tools::getValue('id_category') == $id_category)) ? ' class="overForce"' : '';
   $this->_menu .= '<li'.$selected.''.$last.'>';
   if(count(explode('.', $categorie->name)) > 1)
  $name = str_replace('.', '', strstr($categorie->name, '.'));
   else
  $name = $categorie->name;
   $this->_menu .= '<a href="'.$categorie->getLink().'">'.$name.'</a>';
   $childrens = Category::getChildren($id_category, $id_lang);
   if(count($childrens))
   {
  $this->_menu .= '<ul>';
  foreach($childrens as $children)
    $this->getCategory($children['id_category'], $id_lang); // Line 436
  $this->_menu .= '</ul>';
   }
   $this->_menu .= '</li>';
 }

 

Any help is much appriciated.

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...