Jump to content

Custom ACARS Module Error


AFVA | Mitchell

Recommended Posts

Missing argument 2 for ACARSData::FilePIREP(), called in /****/****/****/core/modules/wacars.php on line 42 and defined in core/common/AcarsData.class.php on line 268

Thats the response I get from the server when filing a pirep using my World ACARS program.

wacars.php:

/**
* wacars.php
* World Acars  
* 
* Copyright 2010 Mitchell Williamson
* 
* Liscence:  
* The GNU General Public License (GPL)
* Version 2, June 1991
*/ 

class wacars extends CodonModule
{

		/**
		* Receieves PIREP 
 	* index.php/wacars/pirep
		*/
 	public function pirep()
	 	{
		$pirep_xml = $this->post->pirepxml;
		$xml = simplexml_load_string($pirep);

	$aircraft = OperationsData::getAircraftByReg($xml->reg);
		/** Fill the data array with data from XML */
		$pirep_data = array(
        'pilotid' => $xml->pilotid,
        'flightnum' => $xml->flightnum,
        'depicao' => $xml->depicao,
        'arricao' => $xml->arricao,
        'aircraft' => $aircraft->id,
        'fuelused' => $xml->fuel,
        'landingrate' => $xml->tdr,
        'source' => 'WACARS',
        'submitdate'=>'NOW()',


		);

		/** Submit the pirep */
		$submit = ACARSData::filePIREP($pirepdata);
}

Does anyone know the solution?

Thanks,

Mitch

Link to comment
Share on other sites

  • Administrators

Thanks Nabeel! No error anymore. But the PIREP doesn't file...There is nothing in the SQL database and nothing in the admin panel. Would could cause this?

Probably missing something. You have too few parameters in that PIREP data structure. I'd take a look through the FSFK module and see what you're missing

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...