diff --git a/includes/sorting.php b/includes/sorting.php index f89fab8f7..4720610f0 100644 --- a/includes/sorting.php +++ b/includes/sorting.php @@ -119,7 +119,7 @@ function sort_programs(&$programs, $session) { function by_user_choice(&$a, &$b) { foreach ($GLOBALS['user_sort_choice'] as $sort) { $function = 'by_'.$sort['field']; - $response = $function(&$a, &$b); + $response = $function($a, $b); // Identical response, go on to the next sort choice if (!$response) continue; diff --git a/modules/tv/schedules.php b/modules/tv/schedules.php index d09095fb0..c3c0f13af 100644 --- a/modules/tv/schedules.php +++ b/modules/tv/schedules.php @@ -36,6 +36,10 @@ $schedule->profile = ''; $schedule->recgroup = ''; } + // Add a blank channel, to suppress warnings + if (!$schedule->channel) { + $schedule->channel = Channel::find(null); + } // Add this show $the_schedules[] = &$schedule; }