Skip to content

Conversation

D-AIRY
Copy link
Contributor

@D-AIRY D-AIRY commented Jun 26, 2016

fixed comments parsing in /etc/resolv.conf

$line = trim($line);
if (!empty($line) && $line[0] != '#') {
preg_match_all('~nameserver ([^\r\n;]+)~', $line, $m);
foreach ($m[1] as $s) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preg_match, ~i

$pool->nameServers[] = $s;
foreach (explode("\n", $data) as $line) {
$line = trim($line);
if (!empty($line) && $line[0] != '#') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$line !== '' && $line[0] !== '#'

foreach (explode("\n", $data) as $line) {
$line = trim($line);
if ($line !== '' && $line[0] !== '#') {
preg_match('~nameserver ([^\r\n;]+)~i', $line, $m);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if

@kakserpom kakserpom merged commit b907e56 into kakserpom:master Jun 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants