diff --git a/airtime_mvc/application/models/airtime/Podcast.php b/airtime_mvc/application/models/airtime/Podcast.php index f5642a6bb..4b6b609fa 100644 --- a/airtime_mvc/application/models/airtime/Podcast.php +++ b/airtime_mvc/application/models/airtime/Podcast.php @@ -73,6 +73,10 @@ class Podcast extends BasePodcast $podcastArray["episodes"] = array(); foreach ($rss->item as $item) { + // Same as above, we need to explicitly cast the SimpleXMLElement 'array' into an actual array + foreach($item as $k => $v) { + $item[$k] = (string)$v; + } array_push($podcastArray["episodes"], $item); } return $podcastArray; @@ -109,6 +113,10 @@ class Podcast extends BasePodcast $podcastArray["episodes"] = array(); foreach ($rss->item as $item) { + // Same as above, we need to explicitly cast the SimpleXMLElement 'array' into an actual array + foreach($item as $k => $v) { + $item[$k] = (string)$v; + } array_push($podcastArray["episodes"], $item); } diff --git a/airtime_mvc/application/modules/rest/controllers/PodcastController.php b/airtime_mvc/application/modules/rest/controllers/PodcastController.php index 86aa767ae..2913684b3 100644 --- a/airtime_mvc/application/modules/rest/controllers/PodcastController.php +++ b/airtime_mvc/application/modules/rest/controllers/PodcastController.php @@ -177,7 +177,7 @@ class Rest_PodcastController extends Zend_Rest_Controller case "DELETE": foreach($ids as $id) { Podcast::deleteById($id); - $responseBody = "Success"; // TODO + $responseBody = "Success"; // TODO: make this more descriptive } break; case "GET": @@ -186,9 +186,6 @@ class Rest_PodcastController extends Zend_Rest_Controller $responseBody[] = array( "podcast"=>json_encode($podcast), "html"=>$this->view->render($path), - "type"=>"podcast", // TODO: get rid of these extraneous fields - "id"=>$podcast["id"] - // "id"=>$podcast->getDbId() ); } break;