Re: Bug #18242 [NEW]: ddns creation of TXT records truncates to last word

From: Date: Sun, 06 Feb 2011 08:15:46 +0000
Subject: Re: Bug #18242 [NEW]: ddns creation of TXT records truncates to last word
References: 1  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-5819@lists.php.net to get a copy of this message
I will fix that Tomorrow. Thanks. Marco Kaiser Am 04.02.2011 um 19:58 schrieb "Mike dot Mitchell at sas dot com" <pear-qa@lists.php.net>: > 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 > -- >

« previous php.pear.qa (#5819) next »