Permalink
Browse files

dmllib:rcache_set()/rcache_get() - use clone() function which we can …

…support in PHP4 - MDL-12827
  • Loading branch information...
1 parent 72cd33b commit e54510d166642b31ac5f6e424ea7cd444a99a404 martinlanghoff committed Jan 8, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/dmllib.php
View
@@ -2324,7 +2324,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;
@@ -2388,7 +2388,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;

0 comments on commit e54510d

Please sign in to comment.