Fix DB drivers version() implementations that don't execute a query
Fails if called prior to the DB connection initialization.
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index 57a3c5c..923f0e1 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -165,6 +165,10 @@
{
return $this->data_cache['version'];
}
+ elseif ( ! $this->conn_id)
+ {
+ $this->initialize();
+ }
// Not all subdrivers support the getAttribute() method
try