Ticket #10142: 0001-fix-findSchedules-returning-undefind-as-array.patch

File 0001-fix-findSchedules-returning-undefind-as-array.patch, 608 bytes (added by anonymous, 5 years ago)
  • modules/tv/classes/Schedule.php

    ---
     modules/tv/classes/Schedule.php |    6 +++++-
     1 files changed, 5 insertions(+), 1 deletions(-)
    
    diff --git a/modules/tv/classes/Schedule.php b/modules/tv/classes/Schedule.php
    index 7129da5..16feebc 100644
    a b class Schedule extends MythBase { 
    112112                        }
    113113                        Cache::set('Schedule::findScheduled', self::$scheduledRecordings);
    114114                }
    115                 return self::$scheduledRecordings;
     115                if (is_null(self::$scheduledRecordings)) {
     116                        return array();
     117                } else {
     118                        return self::$scheduledRecordings;
     119                }
    116120        }
    117121
    118122/**