Bug #6187
closedGrowl notifications emit PHP warnings if the specified name does not exist
100%
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.