Skip to content

Commit

Permalink
MDL-29199 dml: fix query logging on Oracle
Browse files Browse the repository at this point in the history
thanks to Jonathon Fowler for the fix
  • Loading branch information
danpoltawski committed Feb 24, 2012
1 parent d1c12af commit 9ee937e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dml/oci_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9ee937e

Please sign in to comment.