diff --git a/lib/classes/base.php b/lib/classes/base.php index 4ffe971e60..c0830850e9 100644 --- a/lib/classes/base.php +++ b/lib/classes/base.php @@ -139,6 +139,11 @@ abstract class base implements cache_cacheableInterface */ public function get_connection() { + if($this->connection->ping() === false){ + $this->connection->close(); + $this->connection->connect(); + } + return $this->connection; }