Fix bug with podcasts incorrectly linked to program
This commit is contained in:
@@ -25,11 +25,12 @@ class Podcast extends Model {
|
||||
$this->auth = $this->key;
|
||||
}
|
||||
|
||||
if(isset($data->program) && $data->program) {
|
||||
if(isset($data->program)) {
|
||||
$this->program = null;
|
||||
if(is_object($data->program)) {
|
||||
$this->program = new \Model\Program($data->program);
|
||||
} else {
|
||||
$this->program = new \Model\Program(['id' => $this->program, 'name' => $data->program_name, 'description' => $data->program_description]);
|
||||
} elseif($data->program) {
|
||||
$this->program = new \Model\Program(['id' => $data->program, 'name' => $data->program_name, 'description' => $data->program_description]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user