commit 595ac61653aad2304087fa7dc7dc16211bec0824 parent 5eac309c02c45494a173b1a6276aaa502e06140c Author: dankert <devnull@localhost> Date: Wed, 14 Oct 2009 01:13:38 +0200 Als SQL-Query immer ein Objekt erwarten, sonst Abbruch. Diffstat:
db/db.class.php | | | 11 | +++++++---- |
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/db/db.class.php b/db/db.class.php @@ -183,12 +183,15 @@ class DB return new DB_result( $this->client,$result ); } - if ( is_object($query) ) - $query = $query->query; + + if ( !is_object($query) ) + die('SQL-Query must be an object'); + + $flatQuery = $query->getQuery(); - Logger::trace('DB query: '.substr($query,0,45).'...'); + Logger::trace('DB query: '.$query->raw); - $result = $this->client->query($query); + $result = $this->client->query($flatQuery); if ( $result === FALSE ) {