mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Prevent attempting to close an uninitialized Redis instance (issue #13001)
This commit is contained in:
parent
d486e1ca9e
commit
0cc3509b74
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ class RedisEngine extends CacheEngine {
|
|||
* Disconnects from the redis server
|
||||
*/
|
||||
public function __destruct() {
|
||||
if (empty($this->settings['persistent'])) {
|
||||
if (empty($this->settings['persistent']) && !is_null($this->_Redis)) {
|
||||
$this->_Redis->close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue