Permalink
Browse files

MDL-29199 dml: fix query logging on Oracle

thanks to Jonathon Fowler for the fix
  • Loading branch information...
1 parent d1c12af commit 9ee937eb335b698b1704f79bef5b26e5ee3cc81e @danpoltawski danpoltawski committed Feb 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dml/oci_native_moodle_database.php
@@ -303,7 +303,7 @@ protected function fix_table_names($sql) {
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);

0 comments on commit 9ee937e

Please sign in to comment.