Custom ACARS Module Error

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

filePIREP has two parameters:

http://docs.phpvms.net/api/codon_core/ACARSData.html#FilePIREP

You’re missing cod ein the filepirep too… check out the fsfk module..

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?

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