This causes the screen to show up empty because of the lack of error-handling.
The XML looks like:
<body copyright="All data copyright DC Circulator 2012."><predictions agencyTitle="DC Circulator" routeTitle="Georgetown - Union Station" routeTag="yellow" stopTitle="K Street NW And 24th Street NW" stopTag="k24th_w" dirTitleBecauseNoPredictions="Westbound">
</predictions><predictions agencyTitle="DC Circulator" routeTitle="Georgetown - Union Station Night" routeTag="gtownpm" stopTitle="K Street NW And 24th Street NW" stopTag="k24th_w" dirTitleBecauseNoPredictions="Westbound">
</predictions></body>
in transit_functions_helper we want something like:
This causes the screen to show up empty because of the lack of error-handling.
The XML looks like:
in transit_functions_helper we want something like:
$destination = (string) $busxml->predictions->dirTitleBecauseNoPredictions;
instead of:
$destination = (string) $busxml->predictions->direction[0]->attributes()->title;