Fatal error: Call to a member function getCatId() on a non-object in /data/home/hlu019050/htdocs/src/Cms/CompanyBundle/Controller/ArticleController.php on line 269 Error: Call to a member function getCatId() on a non-object (500 Internal Server Error)
Exception detected!

Error: Call to a member function getCatId() on a non-object

500 Internal Server Error - FatalErrorException

Stack Trace

  1. in src/Cms/CompanyBundle/Controller/ArticleController.php at line 269  -
    1.             ->getRepository('CmsAdminBundle:Article')->findOneBy(array('id'=>$id));
    2.         //article cat contains all of article
    3.         $cat_id $article->getCatId();
    4.         $articles $this->getDoctrine()
    5.             ->getRepository('CmsAdminBundle:Article')->findBy(array('cat_id'=>$cat_id,'language'=>$language)
    6.             ,array('sort'=>'asc'));

Logs  -

Stack Trace (Plain Text)  +