mirror of
https://github.com/predis/predis.git
synced 2026-09-10 10:27:11 +00:00
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:
@@ -54,7 +54,7 @@ class StreamConnection extends AbstractConnection
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
if (!$this->parameters->persistent) {
|
||||
if (isset($this->parameters) && !$this->parameters->persistent) {
|
||||
$this->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user