projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
002b0c6
)
dmllib:rcache_get()/rcache_set() clone cached records - we do not want magic referenc...
author
martinlanghoff
<martinlanghoff>
Sun, 6 Jan 2008 22:46:20 +0000
(22:46 +0000)
committer
martinlanghoff
<martinlanghoff>
Sun, 6 Jan 2008 22:46:20 +0000
(22:46 +0000)
lib/dmllib.php
patch
|
blob
|
history
diff --git
a/lib/dmllib.php
b/lib/dmllib.php
index 14a344e70a51e2fb53df49fcc89e496ab59b7be2..47a50430328ae8268f3409bcf7b7330e4516e201 100644
(file)
--- a/
lib/dmllib.php
+++ b/
lib/dmllib.php
@@
-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;