[mythtv-users] database on 32/fixes

James jam at tigger.ws
Mon Apr 25 14:53:27 UTC 2022



> On 25 Apr 2022, at 10:31 pm, Paul Harrison <mythtv at mythqml.net> wrote:
> 
> Looks like all db errors are being treated as fatal on your system but not on others.
> 
> https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14 <https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14>
> It looks like that code should first disable fatal errors, check for the existence of the music_songs table and enable or disable the music module accordingly. 
> 

I'm not going to lose sleep but:


// First, we should check to see that MythMusic is configured.
// Make sure to turn off fatal errors in case the table isn't there.
    $db->disable_fatal_errors();
    $has_music = $db->query_col('SELECT COUNT(*) FROM music_songs');
    $db->enable_fatal_errors();
    $db->error(false);

But I get a fatal error! maybe there's another check?


Fatal error: Uncaught mysqli_sql_exception: Table 'mythconverg.music_songs' doesn't exist in /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php:68 Stack trace: #0 /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php(68): mysqli_query() 

Yup
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20220425/4a104658/attachment.htm>


More information about the mythtv-users mailing list