Project

General

Profile

Actions

Bug #6187

closed

Growl notifications emit PHP warnings if the specified name does not exist

Added by Phillip Davis over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Logging
Target version:
Start date:
04/17/2016
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.3
Affected Architecture:

Description

System->Advanced, Notifications
1) In the Growl section, "IP Address", put an invalid hostname (e.g. I put junk.inf.org)
2) Press "Test Growl Settings"
A bunch of warnings are emitted to the browser window like:
Warning: socket_sendto(): Host lookup failed [-10001]: Unknown host in /etc/inc/growl.class on line 78 Call Stack: 0.0001 239656 1. {main}() /usr/local/www/system_advanced_notifications.php:0 0.0197 808432 2. register_via_growl() /usr/local/www/system_advanced_notifications.php:202 0.2030 818272 3. Growl->register() /etc/inc/notices.inc:461 0.2031 818640 4. Growl->send() /etc/inc/growl.class:50 0.2031 818992 5. socket_sendto() /etc/inc/growl.class:78

A "crash" is reported on the dashboard like:
PHP Errors:
[17-Apr-2016 06:34:40 Etc/UTC] PHP Stack trace:
[17-Apr-2016 06:34:40 Etc/UTC] PHP 1. {main}() /usr/local/www/system_advanced_notifications.php:0
[17-Apr-2016 06:34:40 Etc/UTC] PHP 2. register_via_growl() /usr/local/www/system_advanced_notifications.php:202
[17-Apr-2016 06:34:40 Etc/UTC] PHP 3. Growl->register() /etc/inc/notices.inc:461
[17-Apr-2016 06:34:40 Etc/UTC] PHP 4. Growl->send() /etc/inc/growl.class:50
[17-Apr-2016 06:34:40 Etc/UTC] PHP 5. socket_sendto() /etc/inc/growl.class:78

Forum discussion: https://forum.pfsense.org/index.php?topic=109564.msg609981#msg609981

The source of the problem is (mostly I think) that when dns_get_record() cannot find a name, it returns false (good thing), but also emits a PHP warning.

Find a way to fix this up, or trap and handle the warning or...

This will help with https://redmine.pfsense.org/issues/6178 by reducing the "dud" warnings that are nothing to do with coding problems.

Actions #2

Updated by Jim Thompson over 8 years ago

  • Assignee set to Anonymous
Actions #3

Updated by Anonymous over 8 years ago

  • Status changed from New to Feedback
  • Assignee changed from Anonymous to Phillip Davis

PR merged. Thanks Phil.

Actions #4

Updated by Phillip Davis over 8 years ago

  • % Done changed from 0 to 100
Actions #5

Updated by Chris Buechler over 8 years ago

  • Status changed from Feedback to Resolved

fixed

Actions

Also available in: Atom PDF