Permalink
Browse files

just close the connection if the connection is already connected

  • Loading branch information...
swznd committed Feb 11, 2013
1 parent 0652398 commit df2b1b4ab1d3a06f7dbd2ae97bbf73a9553a0a3a
Showing with 4 additions and 1 deletion.
  1. +4 −1 libraries/Redis.php
View
@@ -394,7 +394,10 @@ public function debug($bool)
*/
function __destruct()
{
- fclose($this->_connection);
+ if($this->_connection)
+ {
+ fclose($this->_connection);
+ }
}
/**

0 comments on commit df2b1b4

Please sign in to comment.