Prevent E_NOTICE messages on __destruct() if $parameters is not set.

This can only happen when throwing on invalid connection parameters,
this is a quick fix that will do for now.
This commit is contained in:
Daniele Alessandri
2013-02-17 14:15:43 +01:00
parent b50a5975ac
commit de4bae3f9b
+1 -1
View File
@@ -54,7 +54,7 @@ class StreamConnection extends AbstractConnection
*/
public function __destruct()
{
if (!$this->parameters->persistent) {
if (isset($this->parameters) && !$this->parameters->persistent) {
$this->disconnect();
}
}