Opened 15 years ago

Closed 13 years ago

Last modified 13 years ago

#10142 closed Patch - Bug Fix (fixed)

Prevent PHP warning in upcoming.php due to wrong datatype in foreach

Reported by: Philipp Wagner <mail@…> Owned by: Rob Smith
Priority: minor Milestone: 0.27
Component: Plugin - MythWeb Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: yes

Description

At /tv/upcoming I get the following PHP warning:


Warning at /usr/share/mythtv/mythweb/modules/tv/upcoming.php, line 96: !NoTrans: Invalid argument supplied for foreach()!!

Warning at /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php, line 16: !NoTrans: Cannot modify header information - headers already sent by (output started at /usr/share/mythtv/mythweb/includes/errors.php:150)!!


It seems that the code tried to prevent that, but somehow it didn't get a full fix ($scheduled is unused). Trivial patch attached.

I am running 0.24.1 here, but it seems that the code is the same in the git master.

Attachments (3)

mythweb-php-warning.patch (617 bytes ) - added by Philipp Wagner <mail@…> 15 years ago.
mythweb-php-warning-pt2.patch (629 bytes ) - added by Philipp Wagner <mail@…> 15 years ago.
Fixing same problem in detail.php
0001-fix-findSchedules-returning-undefind-as-array.patch (608 bytes ) - added by anonymous 15 years ago.

Download all attachments as: .zip

Change History (17)

by Philipp Wagner <mail@…>, 15 years ago

Attachment: mythweb-php-warning.patch added

by Philipp Wagner <mail@…>, 15 years ago

Fixing same problem in detail.php

comment:1 by Philipp Wagner <mail@…>, 15 years ago

I just found that detail.php has the same problem; I hope it's ok to add this to this bug report, otherwise I'm happy to open a new one or attach an combined patch if that's easier for you.

comment:2 by anders@…, 15 years ago

Has this bug been fixed...? Tryed to change my php files but they couldend load after change.

comment:3 by mail@…, 15 years ago

No, as far as I know the patches have not been applied. I have no idea how the process to get a patch applied is supposed to work in MythTV.

comment:4 by anders@…, 15 years ago

What a shame...pretty irritating :P

comment:5 by robertm, 15 years ago

Ticket locked: set

irritating indeed.

comment:6 by sphery, 15 years ago

Ticket locked: unset

Unlocking to allow uploading another patch. Please keep discussion out of the bug tracker so we don't have to lock the ticket, again.

by anonymous, 15 years ago

comment:7 by christian.wittrock@…, 14 years ago

Hi, The problem occurred in my new 12.04 installation today. The "fix" listed here does not correct the problem that I have. Of course it takes care of the web error, but it does not solve the real problem. It hides it. What I see is that scheduling does not work at all. I can see from the list that there are programs that the scheduler should find but it doesn't. Even the programs that were part of the scheduled recordings (visible yesterday) have disappeared. I have all the latest updates installed. Please advice if I should retrieve any information from a log.

comment:8 by christian.wittrock@…, 14 years ago

Update... After I cleaned out some bad recordings, removed some unwanted custom schedules, added the fix and rebooted the scheduler seemed to come alive again...

comment:9 by a-j@…, 14 years ago

Just want to report I had the same warning (NoTrans: Invalid argument supplied for foreach)in detail.php on a fresh install of MythTV 0.25-fixes and the latest MythWeb from git. Applying the patch provided by Philipp in the beginning of this ticket fixed it for me. Thanks!

comment:10 by christian.wittrock@…, 14 years ago

Hi,

as this bug kills the scheduler and pretty much renders MythTV useless, I suggest to change the priority to critical and get the fix released.

The issue seems to occur whenever EPG data is missing from a channel, which is a common situation.

I had to re-install 12.04 because it crashed terminally, and now I have again run into this bug. So, please get this patch released.

comment:11 by Kenni Lund [kenni a kelu dot dk], 14 years ago

Ticket locked: set

There's no way this bug could have killed your OS...and as stated before, please keep disussions (and posts which add no value to the report), out of the report.

comment:12 by Kenni Lund [kenni a kelu dot dk], 14 years ago

Refs. #9967

comment:13 by Rob Smith <kormoc@…>, 13 years ago

Resolution: fixed
Status: newclosed

In d8b1f404bc0f51a7aff72202713ffc198755a37b/mythweb:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:14 by Raymond Wagner, 13 years ago

Milestone: unknown0.27
Note: See TracTickets for help on using tickets.