Edit report at http://pear.php.net/bugs/bug.php?id=18553&edit=1
ID: 18553
Updated by: admin@de-korte.org
Reported By: admin at de-korte dot org
Summary: Fails to parse /etc/resolv.conf file with comments
Status: Open
Type: Bug
Package: Net_DNS2
-Operating System: openSUSE
+Operating System: Linux
Package Version: 1.1.1
PHP Version: 5.3.6
Roadmap Versions:
New Comment:
-Operating System: openSUSE
+Operating System: Linux
Sorry about the duplicates... :-(
Previous Comments:
------------------------------------------------------------------------
[2011-05-19 11:11:47] adkorte
Description:
------------
The /etc/resolv.conf file on my system is generated automatically and
contains several lines which start with a '#' character (comment lines).
This results in many errors being logged, since some contain only a '#'
character:
PHP ERROR: Undefined offset: 1 [pid 19394 on line 309 of
"/usr/share/php5/PEAR/Net/DNS2.php"
It would be useful to strip lines starting with '#' before parsing them.
------------------------------------------------------------------------