[mythtv-commits] Ticket #2347: Fatal error: Call to a member function on a non-object in includes/programs.php on line 193

MythTV mythtv at cvs.mythtv.org
Fri Sep 8 21:56:06 UTC 2006


#2347: Fatal error: Call to a member function on a non-object in
includes/programs.php on line 193
---------------------------------------------------------------+------------
 Reporter:  Pekka Jääskeläinen <pekka.jaaskelainen at gmail.com>  |       Owner:  xris   
     Type:  defect                                             |      Status:  new    
 Priority:  minor                                              |   Milestone:  unknown
Component:  mythweb                                            |     Version:         
 Severity:  medium                                             |  
---------------------------------------------------------------+------------
 I added 'if ($program != NULL)' before the line 193 to fix it. The patch
 being:

 {{{

 Index: includes/programs.php
 ===================================================================
 --- includes/programs.php       (revision 11075)
 +++ includes/programs.php       (working copy)
 @@ -190,7 +190,8 @@
              if
 ($Scheduled_Recordings[$data['channum']][$data['starttime_unix']][0]->title
 == $data['title']) {
                  $program =&
 $Scheduled_Recordings[$data['channum']][$data['starttime_unix']][0];
              // merge in data fetched from DB
 -                $program->merge(new Program($data));
 +                if ($program != NULL)
 +                    $program->merge(new Program($data));
              }
          // Otherwise, create a new instance of the program
              else {
 }}}

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/2347>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list