Re: [PEAR-BUG] Bug #18242 [NEW]: ddns creation of TXT records truncates to last word
[email protected] (Marco Kaiser)
| Newsgroups | php.pear.qa |
|---|---|
| Message-ID | <5EFCC5D952FBD5409D556BD0A9AD2323011A25FB12E5@cdmm-xchange.cdmm.local> |
I will fix that Tomorrow. Thanks. Marco Kaiser Am 04.02.2011 um 19:58 schrieb "Mike dot Mitchell at sas dot com" <[email protected]>: > From: dundakitty > Operating system: Redhat ES 3.0 > Package version: 1.0.7 > PHP version: 5.2.12 > Package: Net_DNS > Bug Type: Bug > Bug description: ddns creation of TXT records truncates to last word > > Description: > ------------ > When creating TXT records, the rdata field is truncated to just the last > word. > > Adding double quotes around the data passes the string through, but now the > data packet includes the double quotes. > > > > The problem is with the preg_match statement at line 62 of TXT.php. I > don't understand the purpose of the preg_match. Wouldn't a 'trim()' call > be sufficient? > > Test script: > --------------- > <?php > > require_once('Net/DNS.php'); > > > > $zone = 'sasinstitute.net'; > > $nm = 'ddns-test.' . $zone; > > $rd = 'v=spf1 mx ip4:192.35.83.16/28 -all'; > > > > $rr = &Net_DNS_RR::factory("$nm 3600 IN TXT $rd"); > > $rr->display(); > > ?> > > > > Expected result: > ---------------- > Entire rdata field is present: > > > > ddns-test.sasinstitute.net. 3600 IN TXT "v=spf1 mx ip4:192.35.83.16/28 > -all" > > > > Actual result: > -------------- > rdata is trunctated to the last word: > > > > ddns-test.sasinstitute.net. 3600 IN TXT "-all" > > > > -- > Edit bug report at http://pear.php.net/bugs/bug.php?id=18242&edit=1 > -- >