We're seeing very frequent errors generated by the code that checks for module and theme update status. The error comes up at line 278 in nagios.module:

$tmp_modules .= ' ' . $projkey . ':' . $tmp_projstatus;

the corresponding error being:

Notice: Undefined variable: tmp_modules in nagios_status_page() (line 279 of sites/all/modules/nagios/nagios.module)

It looks to me like the error is very straightforward and is caused by $tmp_modules not being defined earlier in the code, so that when text is appended to it, we get this problem. It seems to me that the fix is to add an initial assignment, like $tmp_modules = '';, somewhere around line 259. What do you all think? Do other people see this error?

(It can be avoided by turning off the flag to show outdated names, but that's not a very satisfactory fix.)

Comments

bbc’s picture

I was running into the same error and have added the line per the suggestion above. The fix seems to have taken care of the error messages.

Thanks elithorkelson!

greg.harvey’s picture

Assigned: Unassigned » greg.harvey
Issue summary: View changes

Right, simple enough patch. I'll knock this off later. Seems like an edge case, not many reports.

greg.harvey’s picture

Status: Active » Needs review
StatusFileSize
new638 bytes

Patch, for completeness.

greg.harvey’s picture

Status: Needs review » Fixed

Committed to dev.

  • greg.harvey committed ea63ae8 on 7.x-1.x
    Issue #1600648 by greg.harvey: Undefined variable: tmp_modules in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.