ErrorException [ Notice ]: Trying to get property of non-object

APPPATH/classes/Controller/Contacts.php [ 22 ]

17         } else {
18             $this->context->city = Model_City::loadByAlias($cityAlias);
19 
20             if($id) {
21                 $this->context->station = Model_Station::load($id);
22                 $phones = explode(';', $this->context->station->phones);
23                 if(count($phones)>3) {
24                     $this->context->phones_title = implode('<br>', $phones);
25                     $phones = [$phones[0],$phones[1],$phones[2]];
26                 }
27                 else {
  1. APPPATH/classes/Controller/Contacts.php [ 22 ] » Kohana_Core::error_handler(arguments)

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

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

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

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

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

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

Environment