Home » Networking » Net_DNS » Bug #2359
bug in Resolver.php
Details
| Submitted | 2004-09-20 00:47 UTC |
|---|---|
| From | cmoulin at simplerezo dot com |
| Assigned | ekilfoil |
| Status | Closed |
| Package | Net_DNS |
| PHP Version | 4.3.8 |
| OS | FreeBSD 4.9p4 |
| Roadmaps | (Not assigned) |
Comments
[2004-09-20 00:47 UTC] cmoulin at simplerezo dot com
Description:
------------
Take a look at my proposal patch (applying to release 0.03)
Reproduce code:
---------------
--- Resolver.php.orig Mon Sep 20 02:41:26 2004
+++ Resolver.php Mon Sep 20 02:42:04 2004
@@ -280,9 +280,9 @@
$this->read_env();
- if (!strlen($this->domain) && strlen($this->searchlist)) {
- $this->default{"domain"} = $this->default{"searchlist"}[0];
- } else if (! strlen($this->searchlist) && strlen($this->domain)) {
+ if (!strlen($this->domain) && sizeof($this->searchlist)) {
+ $this->domain = $this->searchlist[0];
+ } else if (!sizeof($this->searchlist) && strlen($this->domain)) {
$this->searchlist = array($this->domain);
}
error_reporting($err);
Expected result:
----------------
no warnings with max php debug level ;-)
Actual result:
--------------
Resolver.php#283 - Array to string conversion
Resolver.php#284 - Undefined property: default