*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
- * @copyright Copyright (c) 2008, EllisLab, Inc.
+ * @copyright Copyright (c) 2008 - 2009, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
function _compile_queries()
{
$dbs = array();
-
+
// Let's determine which databases are currently connected to
foreach (get_object_vars($this->CI) as $CI_object)
{
- if ( is_subclass_of(get_class($CI_object), 'CI_DB') )
+ if (is_object($CI_object) && is_subclass_of(get_class($CI_object), 'CI_DB') )
{
$dbs[] = $CI_object;
}