CC-3365: Airtime API returns a non-null value for next item when there is no next item.

- Improved check for determining if there is another element in the result set which is used to compute the next value.
This commit is contained in:
Daniel 2012-02-29 14:54:54 -05:00
parent fc2b18923e
commit 1deee3cb65
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ class Application_Model_Schedule {
"ends"=>$row[$i]["ends"],
"media_item_played"=>$row[0]["media_item_played"],
"record"=>0);
if ( $i +1 <= $numberOfRows){
if ( isset($row[$i+1])){
$results['next'] = array("name"=>$row[$i+1]["artist_name"]." - ".$row[$i+1]["track_title"],
"starts"=>$row[$i+1]["starts"],
"ends"=>$row[$i+1]["ends"]);