ErrorException [ Notice ]: Trying to access array offset on value of type null

MODPATH/files/classes/controller/download.php [ 13 ]

 8 	public function action_file() {
 9         $code = $this->request->param('file_code');
10         
11         $file = Model_Files::getCodeFile($code);
12         
13         $name = (!empty($file['name'])) ? $file['name'].'.'.$file['ext'] : $file['orginal_name'];
14         
15 		Files::download(Files::getFilePath($file), $name);
16 
17 		
18     }	
  1. MODPATH/files/classes/controller/download.php [ 13 ] » Kohana_Core::error_handler(arguments)

  2. {PHP internal call} » Controller_Download->action_file()

  3. SYSPATH/classes/kohana/request/client/internal.php [ 118 ] » ReflectionMethod->invoke(arguments)

  4. SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  5. SYSPATH/classes/kohana/request.php [ 1138 ] » Kohana_Request_Client->execute(arguments)

  6. DOCROOT/index.php [ 105 ] » Kohana_Request->execute()

Environment