Opened 16 years ago
Closed 15 years ago
#7502 closed defect (fixed)
Mythweb fatal error when clicking "Never Record"
Reported by: | Owned by: | Rob Smith | |
---|---|---|---|
Priority: | minor | Milestone: | 0.23 |
Component: | Plugin - MythWeb | Version: | 0.22-fixes |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
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 )
Attachments (1)
Change History (5)
comment:1 Changed 15 years ago by
comment:3 Changed 15 years ago by
Milestone: | unknown → 0.23 |
---|---|
Ticket locked: | unset |
Version: | unknown → 0.22-fixes |
Unlocking so Jim can attach patch here.
Stuart
Changed 15 years ago by
Attachment: | 7502.patch added |
---|
Attaching patch file instead of inline patch text.
Note: See
TracTickets for help on using
tickets.
This error occurs on my system (0.21) as well. Why has the patch not been applied?