[mythtv-commits] Ticket #3116: Mythweb Stats errors when there are no oldrecordings
MythTV
mythtv at cvs.mythtv.org
Wed Feb 21 08:40:14 UTC 2007
#3116: Mythweb Stats errors when there are no oldrecordings
---------------------+------------------------------------------------------
Reporter: kormoc | Owner: xris
Type: defect | Status: new
Priority: trivial | Milestone: unknown
Component: mythweb | Version: head
Severity: low |
---------------------+------------------------------------------------------
{{{
Using mythplugins 0.20a I get the following php error on the recording
statistics page of mythweb:
*Error* at /srv/www/htdocs/mythweb/modules/stats/tmpl/default/stats.php,
line 87:
Invalid argument supplied for foreach()
*Error* at /srv/www/htdocs/mythweb/modules/stats/tmpl/default/stats.php,
line 114:
Invalid argument supplied for foreach()
It appears to be because $top_ten_shows and $top_ten_chans are not set. I
added a check and right before the foreach loop isset($top_ten_shows)
returns false. This is most probably because I have no shows recorded and
haven't used mythtv yet. Infact the same page displays:
First recording: Wednesday December 31st, 1969To fix the problem, I just
added an if (isset($top_ten_shows) { .. } and if (isset($top_ten_chans) {
... } surrounding each foreach loop. I'm not sure that is the best fix but
I
just wanted to let the developers know.
Thanks,
Kareem
}}}
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/3116>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list