Uncaught error when cancel recording via Mythweb

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
Reza
Newcomer
Posts: 1
Joined: Tue May 28, 2019 8:49 pm
Canada

Uncaught error when cancel recording via Mythweb

Post by Reza » Tue May 28, 2019 9:22 pm

I built and installed MythTV from source, cloned from branch fixes/30 on Linux Ubuntu 16.04.
The capture card is HDHomerun, all configuration is done. I can stream live TV via mythfrontend.
I use Mythweb to start recording a live channel selected from Program Listing. I can see the .ts file corresponding to the recording channel being created and increased in size at my backend machine.
When I cancel the recording, I got this error at Mythweb:
( ! ) Fatal error: Uncaught Error: Call to a member function backend_row() on null in /usr/local/share/mythtv/mythweb/modules/tv/classes/Program.php on line 752
( ! ) Error: Call to a member function backend_row() on null in /usr/local/share/mythtv/mythweb/modules/tv/classes/Program.php on line 752
Call Stack
# Time Memory Function Location
1 0.0194 370136 {main}( ) .../mythweb.php:0
2 0.0744 555568 require_once( '/usr/local/share/mythtv/mythweb/modules/tv/handler.php' ) .../mythweb.php:35
3 0.0794 599864 require_once( '/usr/local/share/mythtv/mythweb/modules/tv/detail.php' ) .../handler.php:82
4 0.1053 706296 Program->stopRecording( ) .../detail.php:197

Using Xdebug at the backend the culprit seems to be this function from mythweb/modules/tv/classes/Program.php
public function stopRecording() {
if ($this->recstatus != 'Recording')
return false;
MythBackend::find()->sendCommand(array('STOP_RECORDING', $prog->backend_row(), '0'));
return true;
}

The $prog variable in the function in not initialized and causes the exception.
Any ideas how to fix the issue?
Thanks.

Post Reply