Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #7502: Mythweb fatal error when clicking "Never Record"

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


mythtv at cvs

Nov 4, 2009, 10:42 AM

Post #1 of 1 (48 views)
Permalink
Ticket #7502: Mythweb fatal error when clicking "Never Record"

#7502: Mythweb fatal error when clicking "Never Record"
--------------------------------+-------------------------------------------
Reporter: stichnot@… | Owner: kormoc
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: Plugin - MythWeb | Version: unknown
Severity: medium | Mlocked: 0
--------------------------------+-------------------------------------------
Search for a program that isn't associated with a recording rule, then
select the program and click the "Never Record" button. This gives a
fatal error message, the gist of which is:

{{{
error string: SQL Error: Column 'recordid' cannot be null
filename: /usr/share/mythweb/modules/tv/classes/Program.php
error line: 711
}}}

If this error is fixed, it reveals a similar error that column 'rectype'
cannot be null. It appears to me that both values should be 0 if there is
no corresponding recording rule.

Here is a sample patch, but maybe there is a better way to do it.

{{{
Index: mythweb/modules/tv/classes/Program.php
===================================================================
--- mythweb/modules/tv/classes/Program.php (revision 22733)
+++ mythweb/modules/tv/classes/Program.php (working copy)
@@ -703,9 +703,9 @@
.escape($this->category)
.','
.escape($this->seriesid)
.','
.escape($this->programid)
.','
- .escape($this->recordid)
.','
+ .escape(isset($this->recordid) ?
$this->recordid : 0) .','
.escape($this->channel->callsign)
.','
- .escape($this->rectype)
.','
+ .escape(isset($this->rectype) ?
$this->rectype : 0) .','
.'11'
.','
.'1'
.')')
or trigger_error('SQL Error: '.mysql_error(), FATAL);

}}}

Here is more of the error output.

{{{
datetime: 2009-11-04 10:20:46 (PST)
errornum: 256
error type: User Error
error string: SQL Error: Column 'recordid' cannot be null
filename: /usr/share/mythweb/modules/tv/classes/Program.php
error line: 711

==========================================================================

Backtrace:

file: /usr/share/mythweb/modules/tv/classes/Program.php
line: 711
class:
function: trigger_error
type:
args: Array
(
[0] => SQL Error: Column 'recordid' cannot be null
[1] => 256
)

file: /usr/share/mythweb/modules/tv/detail.php
line: 258
class: Program
function: rec_never_record
type: ->
args: Array ( )
file: /usr/share/mythweb/modules/tv/handler.php
line: 87
class:
function: require_once
type:
args: Array
(
[0] => /usr/share/mythweb/modules/tv/detail.php
)

file: /usr/share/mythweb/mythweb.php
line: 35
class:
function: require_once
type:
args: Array
(
[0] => /usr/share/mythweb/modules/tv/handler.php
)

}}}

--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7502>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.