Error [ 0 ]: Call to a member function save() on null

APPPATH/classes/Controller/Media.php [ 325 ]

320 		{
321 			if(!is_file(MEDIAPATH.$page_type."/".$page_id."/orig/".$file))
322 			{
323 				$fl->check_directory_structure(MEDIAPATH.$page_type."/".$page_id."/orig");
324 				$img = Model_Media::factory_image($page_type,$page_id,$file);
325 				$img->save(MEDIAPATH.$page_type."/".$page_id."/orig/".$file);
326 				Model_Media::cleanup_factory_image($page_type, $page_id, $file);
327 			}
328 			
329 			$fl->webmedia_load(MEDIAPATH.$page_type."/".$page_id."/orig/".$file);
330 		}
  1. SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Media->action_webmedia()

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

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

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

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

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

Environment