<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>On 25/04/2022 15:53, James wrote:<br>
</p>
<blockquote type="cite"
cite="mid:ED5B287C-43E8-45E0-9532-85698F244DBD@tigger.ws">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 25 Apr 2022, at 10:31 pm, Paul Harrison <<a
href="mailto:mythtv@mythqml.net"
class="moz-txt-link-freetext" moz-do-not-send="true">mythtv@mythqml.net</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta charset="UTF-8" class="">
<p style="caret-color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 24px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px; text-decoration: none;"
class="">Looks like all db errors are being treated as
fatal on your system but not on others.</p>
<p style="caret-color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 24px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px; text-decoration: none;"
class=""><a class="moz-txt-link-freetext"
href="https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14"
moz-do-not-send="true">https://github.com/MythTV/mythweb/blob/master/modules/music/init.php#L14</a></p>
<p style="caret-color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 24px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px; text-decoration: none;"
class="">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. </p>
</div>
</blockquote>
</div>
<br class="">
<div class="">I'm not going to lose sleep but:</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><br class="">
</div>
<div class="">// First, we should check to see that MythMusic is
configured.</div>
<div class="">// Make sure to turn off fatal errors in case the
table isn't there.</div>
<div class=""> $db->disable_fatal_errors();</div>
<div class=""> $has_music = $db->query_col('SELECT
COUNT(*) FROM music_songs');</div>
<div class=""> $db->enable_fatal_errors();</div>
<div class=""> $db->error(false);</div>
</div>
<div class=""><br class="">
</div>
<div class="">But I get a fatal error! maybe there's another
check?</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
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() </div>
<div class=""><br class="">
</div>
<div class="">Yup</div>
<div class="">James</div>
<br>
</blockquote>
<p><br>
</p>
<p>Are you using php 8.1 or later?</p>
<p><a class="moz-txt-link-freetext" href="https://php.watch/versions/8.1/mysqli-error-mode">https://php.watch/versions/8.1/mysqli-error-mode</a><br>
</p>
<p><br>
</p>
<p>Paul H.<br>
</p>
<p><br>
</p>
</body>
</html>