dmllib:rcache_get()/rcache_set() clone cached records - we do not want magic referenc...
authormartinlanghoff <martinlanghoff>
Sun, 6 Jan 2008 22:46:20 +0000 (22:46 +0000)
committermartinlanghoff <martinlanghoff>
Sun, 6 Jan 2008 22:46:20 +0000 (22:46 +0000)
lib/dmllib.php

index 14a344e70a51e2fb53df49fcc89e496ab59b7be2..47a50430328ae8268f3409bcf7b7330e4516e201 100644 (file)
@@ -2583,7 +2583,7 @@ function rcache_set($table, $id, $rec) {
     global $CFG, $MCACHE, $rcache;
 
     if ($CFG->cachetype === 'internal') {
-        $rcache->data[$table][$id] = fullclone($rec);
+        $rcache->data[$table][$id] = clone $rec;
     } else {
         $key   = $table . '|' . $id;
 
@@ -2647,7 +2647,7 @@ function rcache_get($table, $id) {
     if ($CFG->cachetype === 'internal') {
         if (isset($rcache->data[$table][$id])) {
             $rcache->hits++;
-            return $rcache->data[$table][$id];
+            return clone $rcache->data[$table][$id];
         } else {
             $rcache->misses++;
             return false;