MovieLib - Your movie database on web
(2017-03-28, 17:38)xekon Wrote: Notice something new while exploring features, I was clicking through the Genres one at a time on the left menu, when I click into Crime or Family it takes me to those results but I get the following message at the top of the page:

Code:
Notice: Undefined variable: img_flag_atype in /var/www/movielib/index.php on line 644

upon examining the code, atype is referring to the audio codec... I will see if i can figure out the file that is doing this

This appears to be the culprit: dtshd_ma

maybe a good solution would be some error checking:

if ($img_flag_atype == NULL) {
$img_flag_atype = uknown
}

then could simply display unknown for unknown types, instead of it generating errors on the page

for now, I made the following change:

edit index.php, make the following change at line 625 change this:
Code:
foreach ($atype_assoc as $key => $val) {
    if(in_array($s['a_codec'], $atype_assoc[$key])) {
to this:
Code:
foreach ($atype_assoc as $key => $val) {
    if($s['a_codec'] == "dtshd_ma") {
            $s['a_codec'] = "truehd";
    }
    if(in_array($s['a_codec'], $atype_assoc[$key])) {

This modification only brought the error to line 647 on my page. I ended up just changing line 5 to...
Code:
ini_set('display_errors',0);
If there is a better way to handle it, i'm open to suggestion, but the site was being filled with line 644 notices that pushed the rest of the page down when using any sorting options.
That said, I'd like to thank Regss for putting this together. Very happy with the results.
Reply


Messages In This Thread
RE: MovieLib - Your movie database on web - by QuattroGam3r - 2017-05-19, 21:17
Last Post - by Jeffreywat - 2017-09-03, 14:02
Logout Mark Read Team Forum Stats Members Help
MovieLib - Your movie database on web8