cvs: pear /Net_DNS DNS.php

From: Date: Wed, 06 Apr 2005 14:55:41 +0000
Subject: cvs: pear /Net_DNS DNS.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-30978@lists.php.net to get a copy of this message
cox Wed Apr 6 10:55:41 2005 EDT Modified files: /pear/Net_DNS DNS.php Log: PHP Notices on wrong domain names (#3969) Perl matches http://cvs.php.net/diff.php/pear/Net_DNS/DNS.php?r1=1.7&r2=1.8&ty=u Index: pear/Net_DNS/DNS.php diff -u pear/Net_DNS/DNS.php:1.7 pear/Net_DNS/DNS.php:1.8 --- pear/Net_DNS/DNS.php:1.7 Wed Apr 6 10:10:18 2005 +++ pear/Net_DNS/DNS.php Wed Apr 6 10:55:41 2005 @@ -343,10 +343,10 @@ 'MAILA' => 254, 'ANY' => 255, ); - if (! strlen($rc[$rrtype])) { - $rc[$rrtype] = NULL; - } - return($rc[$rrtype]); + if (empty($rc[$rrtype])) { + $rc[$rrtype] = NULL; + } + return($rc[$rrtype]); } /*}}}*/ @@ -409,10 +409,11 @@ 254 => 'MAILA', 255 => 'ANY', ); - if (! strlen($rc[$rrtypeval])) { - $rc[$rrtypeval] = NULL; - } - return($rc[$rrtypeval]); + $rrtypeval = preg_replace(array('/\s*/',' /^0*/'), '', $rrtypeval); + if (empty($rc[$rrtypeval])) { + $rc[$rrtypeval] = NULL; + } + return($rc[$rrtypeval]); } /*}}}*/ @@ -467,7 +468,8 @@ 254 => 'NONE', 255 => 'ANY' ); - if (! strlen($rc[$classval])) { + $classval = preg_replace(array('/\s*/',' /^0*/'), '', $classval); + if (empty($rc[$classval])) { $rc[$classval] = NULL; } return($rc[$classval]);

« previous php.pear.cvs (#30978) next »