PHP warning

get_class() expects parameter 1 to be object, array given

/home/alfaterm/public_html/shop/protected/components/clsLoad.php(13438)

13426         );
13427 
13428         $opt = (object) array(
13429             'data' => isset($opt->data) ? $opt->data : '',
13430             'page' => isset($opt->page) ? $opt->page : '',
13431         );
13432 
13433         $values  = array();
13434         $parents = array();
13435         $model   = $opt->data;
13436 
13437         switch (true) {
13438             case get_class($model) == 'TblProducts':
13439                 if (!$model->data) {
13440                     $model->data_keys = array(
13441                         'values'     => array(
13442                             'opt' => array(
13443                                 'return_val' => array('code'),
13444                             )
13445                         ),
13446                         'categories' => array(
13447                             'opt' => array(
13448                                 'return_val' => array('main', 'parents_main'), // Need to add any value to check data keys
13449                                 'data_keys'  => array(
13450                                     'values' => array(

Stack Trace

#0
+
 /home/alfaterm/public_html/shop/protected/controllers/SiteController.php(385): clsLoad::getArrayBreadcrumbsData(stdClass)
380             $title        = $single_title;
381 
382             $opt_breadcrumbs = (object) array(
383                 'data' => $mCategory,
384             );
385             $breadcrumbs     = clsLoad::getArrayBreadcrumbsData($opt_breadcrumbs);
386 
387             $template_title = array();
388             $page_title     = array();
389             if (isset($breadcrumbs->steps) && $breadcrumbs->steps) {
390                 foreach ($breadcrumbs->steps as $i => $step) {
#10
+
 /home/alfaterm/public_html/shop/index.php(17): CApplication->run()
12 $yii=dirname(__FILE__).'/yii/framework/yii.php';
13 $config=dirname(__FILE__).'/protected/config/main.php';
14 
15 require_once($yii);
16 
17 Yii::createWebApplication($config)->run();
2024-03-29 01:35:27 LiteSpeed Yii Framework/1.1.14