Permalink
Browse files

fix serveral warnings for undefined vars

  • Loading branch information...
1 parent 39ec56e commit c34081f7d3cf94d86f693df9b340eab2fc6538a9 @benbalter benbalter committed Jan 31, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 includes/class.db-api.php
@@ -235,7 +235,7 @@ function &connect( $db ) {
}
// cache
- $this->connections[$db] = &$dbh;
+ $this->connections[$db->type] = &$dbh;
return $dbh;
@@ -299,7 +299,7 @@ function get_columns( $table, $db = null ) {
$this->error( $e );
}
- $this->cache_set( $key, $columns, $db->ttl );
+ $this->cache_set( $key, $columns, $this->get_db( $db )->ttl );
return $columns;
}
@@ -393,7 +393,7 @@ function query( $query, $db = null ) {
$this->error( $e );
}
- $this->cache_set( $key, $results, $db->ttl );
+ $this->cache_set( $key, $results, $this->get_db( $db )->ttl );
return $results;
@@ -606,7 +606,7 @@ function cache_get( $key ) {
/**
* Store data in Alternative PHP Cache (APC).
*/
- function cache_set( $key, $value, $tll = null ) {
+ function cache_set( $key, $value, $ttl = null ) {
if ( $ttl == null ) {
$ttl = ( isset( $this->db->ttl) ) ? $this->db->ttl : $this->ttl;

0 comments on commit c34081f

Please sign in to comment.