Skip to content

Commit dd019f5

Browse files
committed
fix no default playlist in player setting it to 0
1 parent 33d9661 commit dd019f5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

core/controllers/Players.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function save()
121121

122122
$data['timezone'] = trim($this->data('timezone'));
123123
$data['station_id_image_duration'] = trim($this->data('station_id_image_duration'));
124-
$data['default_playlist_id'] = $this->data('default_playlist');
124+
$data['default_playlist_id'] = $this->data('default_playlist') ?: null;
125125

126126
$data['parent_player_id'] = $this->data('parent_player_id');
127127
if (!empty($data['parent_player_id'])) {

core/models/Players.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public function save($data, $id = false)
329329

330330
$station_id_data['player_id'] = $id;
331331
if ($station_ids !== false) {
332-
// delete all station IDs for this player.
332+
// delete all station IDs for this player.
333333
$this->db->where('player_id', $id);
334334
$this->db->delete('players_station_ids');
335335

0 commit comments

Comments
 (0)