AirportInfo with ICAO starting with '0' (zero)

Calling AirportInfo in PHP 5.2.6 with the built-in SOAP class for airports whose ICAO code starts with a zero results in the following var_dump:




object(SoapFault)#8 (9) {
  "message:protected"]=>
  string(55) "can't read "::airportTZ(06N)": no such element in array"
  "string:private"]=>
  string(0) ""
  "code:protected"]=>
  int(0)
  "file:protected"]=>
  string(48) "/usr/local/apache2/htdocs/thunberg/air/index.php"
  "line:protected"]=>
  int(11)
  "trace:private"]=>
  array(2) {
    [0]=>
    array(4) {
      "function"]=>
      string(6) "__call"
      "class"]=>
      string(10) "SoapClient"
      "type"]=>
      string(2) "->"
      "args"]=>
      array(2) {
        [0]=>
        string(11) "AirportInfo"
        [1]=>
        array(1) {
          [0]=>
          string(3) "06N"
        }
      }
    }
    [1]=>
    array(6) {
      "file"]=>
      string(48) "/usr/local/apache2/htdocs/thunberg/air/index.php"
      "line"]=>
      int(11)
      "function"]=>
      string(11) "AirportInfo"
      "class"]=>
      string(10) "SoapClient"
      "type"]=>
      string(2) "->"
      "args"]=>
      array(1) {
        [0]=>
        string(3) "06N"
      }
    }
  }
  "faultstring"]=>
  string(55) "can't read "::airportTZ(06N)": no such element in array"
  "faultcode"]=>
  string(4) "NONE"
  "detail"]=>
  object(stdClass)#6 (1) {
    "errorInfo"]=>
    object(stdClass)#7 (2) {
      "errorCode"]=>
      string(4) "NONE"
      "stackTrace"]=>
      string(488) "can't read "::airportTZ(06N)": no such element in array
    while executing
"list name $name location $location longitude $longitude latitude $latitude timezone $::airportTZ($airportCode)"
    (procedure "AirportInfo" line 12)
    invoked from within
"AirportInfo 06N"
    (in namespace inscope "::FlightAwareDirectFlight" script line 1)
    invoked from within
"::namespace inscope ::FlightAwareDirectFlight AirportInfo 06N"
    invoked from within
"interp eval $interp $fqdn $argValues""
    }
  }
}


The above error is different than the “airport doesn’t exist” error so it’s not a matter of an obscure airport – seems to be a bug with var types / array indices.

If you’re confident this is a bug on PHP’s end I’ll go ahead and file it with them – let me know.

That’s a bug on our part when we don’t have a timezone for the airport you requested.

Thank you for the reply and clarification. I figured a way around it by creating a db of 100k+ fixes based on data from www1.nga.mil/ProductsServices/A … fault.aspx) so thanks for saving me a few fractions of a penny per flightxml query I guess 8)