Skip to content

Instantly share code, notes, and snippets.

@tim-cotten
Created March 5, 2021 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim-cotten/e54c7f562b545509f0e63d0293e2e63e to your computer and use it in GitHub Desktop.
Save tim-cotten/e54c7f562b545509f0e63d0293e2e63e to your computer and use it in GitHub Desktop.
PHP Bugs: Property Problems (Example A)
<?php
try
{
$response = $client ->track($request);
if ($response -> HighestSeverity != 'FAILURE' && $response -> HighestSeverity != 'ERROR')
{
$return[0]=$response->TrackDetails->StatusCode;
$return[1]=$response->TrackDetails->StatusDescription;
if($return[0]==''&&$return[1]=='')
{
echo $response->TrackDetails->StatusCode." -- ".$response->TrackDetails->StatusDescription;
}
}
else
{
printError($client, $response);
return "print error $refnum";
}
} catch (SoapFault $exception) {
printFault($exception, $client);
return "print fault $refnum";
}
return $return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment