Home » Networking » Net_DNS » Bug #7069
small bug in Net_DNS_RR::new_from_array()
Details
| Submitted | 2006-03-09 08:13 UTC |
|---|---|
| From | sven dot hergenhahn at eur dot sas dot com |
| Assigned | bate |
| Status | Closed |
| Package | Net_DNS |
| PHP Version | 5.0.5 |
| OS | Linux (FC2) |
| Roadmaps | (Not assigned) |
Comments
[2006-03-09 08:13 UTC] sven dot hergenhahn at eur dot sas dot com
Description:
------------
function &new_from_array($rrarray) uses $rdata and $rrtype instead of $rr->rdata and $rr->rrtype. As $rdata and $rrtype are not set within the function, you won't get the desired result.
Calling e.g. Net_DNS_RR::display() returns "...; no data" as $rr->rdlength is the length of the unset string $rdata
It's a minor bug, but should be fixed.
Cheers,
Sven
Test script:
---------------
222,223c222,223
< if (strlen($rr->rdata)) {
< $rr->rdlength = strlen($rr->rdata);
---
> if (strlen($rdata)) {
> $rr->rdlength = strlen($rdata);
225c225
< if (class_exists('Net_DNS_RR_' . $rr->rrtype)) {
---
> if (class_exists('Net_DNS_RR_' . $rrtype)) {
227c227
< return new $scn($rr, $rr->rdata);
---
> return new $scn($rr, $rdata);
[2006-03-09 08:18 UTC] sven dot hergenhahn at eur dot sas dot com
sorry, something went wrong. the summary should be:
"small bug in Net_DNS_RR::new_from_array()"
Sorry,
Sven
[2006-03-09 10:15 UTC] sven dot hergenhahn at eur dot sas dot com
yes, now it's fine, thanks.
Sven