In nagios_status_page(), the values returned from the modules are not checked for type before trying to get the 'status' element from the value. This means that if a module hands back a string, the value of $severity can be set to a value which does not exist in the $codes array, resulting in a blank status.

The attached patch adds a check that the value is an array and contains a 'status' element before fetching it's value.

CommentFileSizeAuthor
check_type.patch815 bytesbarrett

Comments

dstol’s picture

Status: Needs review » Reviewed & tested by the community

Works for me and seems reasonable.

greg.harvey’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (fixed)

Committed! Thanks!