Merge branch 'MDL-29199-21_STABLE' of git://github.com/danpoltawski/moodle into MOODLE_21_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2012-02-27 18:48:18 +01:00
+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);