MDL-29199 dml: fix query logging on Oracle

thanks to Jonathon Fowler for the fix
This commit is contained in:
Dan Poltawski
2012-02-24 11:55:14 +08:00
parent d1c12af76e
commit 9ee937eb33
+1 -1
View File
@@ -303,7 +303,7 @@ class oci_native_moodle_database extends moodle_database {
if (preg_match_all('/\{([a-z][a-z0-9_]*)\}/', $sql, $matches)) {
foreach($matches[0] as $key=>$match) {
$name = $matches[1][$key];
if ($this->temptables->is_temptable($name)) {
if ($this->temptables && $this->temptables->is_temptable($name)) {
$sql = str_replace($match, $this->temptables->get_correct_name($name), $sql);
} else {
$sql = str_replace($match, $this->prefix.$name, $sql);