ErrorException [ Warning ]: Attempt to read property "id" on null

APPPATH/classes/Controller/Site/Index.php [ 35 ]

30   
31     $sufix = (I18n::lang() == 'pl') ? '' : '_'.I18n::lang();
32     $rs = DB::select('id', [ 'tytul'.$sufix, 'tytul' ], [ 'tresc'.$sufix, 'tresc' ], [ 'seo_title'.$sufix, 'seo_title' ], [ 'seo_description'.$sufix, 'seo_description' ])->from('pages')
33           ->where('alias'.$sufix, '=', $alias)->as_object()->execute()->current();
34           
35     View::set_global('act', 'page_'.$rs->id);
36   
37     $view = 'page';
38   
39     /*if ($rs->id==2) // o nas
40     {
  1. APPPATH/classes/Controller/Site/Index.php [ 35 ] » Kohana_Core::error_handler(arguments)

  2. SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Site_Index->action_page()

  3. {PHP internal call} » Kohana_Controller->execute()

  4. SYSPATH/classes/Kohana/Request/Client/Internal.php [ 94 ] » ReflectionMethod->invoke(arguments)

  5. SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  6. SYSPATH/classes/Kohana/Request.php [ 1000 ] » Kohana_Request_Client->execute(arguments)

  7. DOCROOT/index.php [ 91 ] » Kohana_Request->execute()

Environment