]> git.mjollnir.org Git - moodle.git/commitdiff
dmllib:rcache_set()/rcache_get() - use clone() function which we can support in PHP4...
authormartinlanghoff <martinlanghoff>
Tue, 8 Jan 2008 04:13:32 +0000 (04:13 +0000)
committermartinlanghoff <martinlanghoff>
Tue, 8 Jan 2008 04:13:32 +0000 (04:13 +0000)
lib/dmllib.php

index 0597c8acbbc60bf54f7f2d9fc517638c795829a4..4c55e499f9ae51ee3e4370e712bee3b0bd2e53ee 100644 (file)
@@ -2589,7 +2589,7 @@ function rcache_set($table, $id, $rec) {
     global $CFG, $MCACHE, $rcache;
 
     if ($CFG->cachetype === 'internal') {
-        $rcache->data[$table][$id] = clone $rec;
+        $rcache->data[$table][$id] = clone($rec);
     } else {
         $key   = $table . '|' . $id;
 
@@ -2653,7 +2653,7 @@ function rcache_get($table, $id) {
     if ($CFG->cachetype === 'internal') {
         if (isset($rcache->data[$table][$id])) {
             $rcache->hits++;
-            return clone $rcache->data[$table][$id];
+            return clone($rcache->data[$table][$id]);
         } else {
             $rcache->misses++;
             return false;