Good morning,
I was wondering if you can help me out with a problem in category select .php on my webshop www.japparts.nl
My server is overloaded with debug files :
[16-Aug-2019 23:28:29 Europe/Amsterdam] PHP Warning: Missing argument 5 for zen_get_categories_select(), called in /var/www/vhosts/japparts.nl/httpdocs/includes/functions/extra_functions/categories_select.php on line 38 and defined in /var/www/vhosts/japparts.nl/httpdocs/includes/functions/extra_functions/categories_select.php on line 11
This is the php file
<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @copyright Portions Copyright 2006 Paul Mahot Haarlem the Netherlands
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: categories_select.php 2010-11-21 torvista $
*/
function zen_get_categories_select($categories_array ='', $parent_id='', $parent_link = '', $indent = '', $show_subcategories) {
//note any function argument defaults will never be used if passed '' from tpl_categories_select.php
global $db;
if (!is_array($categories_array)) $categories_array = array();
$categories_query = "select c.parent_id, c.categories_id, cd.categories_name, c.categories_status
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where parent_id = '" . (int)$parent_id . "'
and c.categories_id = cd.categories_id
and c.categories_status=1
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
order by sort_order, cd.categories_name";
$categories = $db->Execute($categories_query);
while (!$categories->EOF) {
$category_link = $parent_link . $categories->fields['categories_id'];
if ($categories->fields['parent_id'] == '0') {
$categories_array[] = array('id' => $categories->fields['categories_id'],
'text' => $indent . $categories->fields['categories_name']);
}
else {
$categories_array[] = array('id' => $category_link,
'text' => $indent . $categories->fields['categories_name']);
}
if ($categories->fields['categories_id'] != $parent_id && $show_subcategories) {
$categories_array = zen_get_categories_select($categories_array, $categories->fields['categories_id'], $category_link . '_', $indent . ' ');
}
$categories->MoveNext();
}
return $categories_array;
}
?>
Bookmarks