Req->Bug #19281 [Opn->Fbk]: with error_reporting(-1) there is undefined property _sock
| From: | mike at mrhost dot ca | Date: | Thu, 09 Feb 2012 21:45:10 +0000 |
| Subject: | Req->Bug #19281 [Opn->Fbk]: with error_reporting(-1) there is undefined property _sock | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8250@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19281&edit=1
ID: 19281
Updated by: mike@mrhost.ca
Reported By: michael dot kefeder at world4you dot com
Summary: with error_reporting(-1) there is undefined property
_sock
-Status: Open
+Status: Feedback
-Type: Feature/Change Request
+Type: Bug
Package: Net_DNS2
Operating System: Linus
Package Version: 1.2.0
PHP Version: 5.3.8
Roadmap Versions:
New Comment:
-Status: Open
+Status: Feedback
-Type: Feature/Change Request
+Type: Bug
We are unable to reproduce the bug as reported.
Please provide a simple script (10 lines or less)
or a link to an external script that can be used
to reproduce the bug.
If you can provide the script, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PEAR.
Thanks for reporting this Michael,
Can you send me an example script that's broken? I tried putting in a
fake name
servers, but I couldn't get it to fail.
Thanks,
Mike
Previous Comments:
------------------------------------------------------------------------
[2012-02-08 15:19:30] michaelkefeder
Description:
------------
When a Net_DNS2 object gets destructed it calls Sockets::close()
function, in there it checks if $this->_sock is a resource, but when
nameservers cannot be reached for example that property doesn't seem to
be set and therefore a warning is emitted. i propose to change the
function to include a property_exists() check first in file
Net/DNS2/Socket/Sockets.php:
public function close()
{
if (property_exists($this, '_sock')
&&is_resource($this->_sock) === true) {
@socket_close($this->_sock);
}
return true;
}
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19281&edit=1