Permalink
Browse files
fix serveral warnings for undefined vars
- Loading branch information...
Showing
with
4 additions
and
4 deletions.
-
+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