Small fix for a blank cat_id being passed to id2name().

This commit is contained in:
skeeter 2001-12-05 01:32:32 +00:00
parent f4fcd97d1f
commit ea096e29ce

View File

@ -414,8 +414,12 @@
return $this->db->f('cat_id'); return $this->db->f('cat_id');
} }
function id2name($cat_id, $item = 'name') function id2name($cat_id = '', $item = 'name')
{ {
if ($cat_id == '')
{
return '--';
}
switch($item) switch($item)
{ {
case 'name': $value = 'cat_name'; break; case 'name': $value = 'cat_name'; break;