PHP Error

Undefined variable: name

/var/www/codebase/yowcow/frontend/models/SearchForm.php(430)

418             else
419                 $name='';
420             return Category::queryCategoryID($name);
421         }
422         else
423         {
424             $allCategories=param('categories.fullmap');
425             if (isset($allCategories[$parent]))
426                 $parentName=$allCategories[$parent];
427             if (isset($allCategories[$parent.'.'.$category]))
428                 $name=$allCategories[$parent.'.'.$category];
429             if ($parentName && $name)
430                 return Category::queryCategoryID($name, $parentName);
431             else
432                 return 0;
433         }
434     }
435 }

Stack Trace

#0
+
 /var/www/codebase/yowcow/frontend/models/SearchForm.php(47): SearchForm->getCategoryID("smallbiz", "services")
42     {
43         if (isset($params['category']))
44         {
45             if (isset($params['parent']))
46             {
47                 $this->category_id=$this->getCategoryID($params['category'],$params['parent']);
48                 $this->category=$params['category'];
49             }
50             else
51             {
52                 $this->category_id=$this->getCategoryID($params['category']);
#1
+
 /var/www/codebase/yowcow/frontend/controllers/SearchController.php(9): SearchForm->loadAttributesFromUrl(array("services", "smallbiz", "l-charlotte-nc"))
04 {
05     public function actionIndex()
06     {
07         $form=new SearchForm();
08         //$form->attributes = $_GET;
09         $form->loadAttributesFromUrl($_GET);
10         $form->expandGetAttributes();
11         if (empty($this->searchForm))
12             $this->searchForm=new HeaderSearchForm();
13         $this->searchForm->attributes=$form->attributes;
14         $search = new SiteSearch($form);
#14
+
 /var/www/codebase/yowcow/frontend/www/index.php(19): CApplication->run()
14 $config=$root.'/config/main-local.php';
15 
16 require_once($common.'/lib/yii/yii.php');
17 require_once($common.'/lib/global.php');
18 
19 Yii::createWebApplication($config)->run();
20 
21 
2024-03-28 15:54:33 Apache/2.4.10 (Debian) Yii Framework/1.1.6