dmllib:rcache_set()/rcache_get() - use clone() function which we can support in PHP4 - MDL-12827

This commit is contained in:
martinlanghoff
2008-01-08 04:13:32 +00:00
parent 378d70eb51
commit 2e7e89a907
+2 -2
View 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;