From 2e7e89a90770c31ea448a35f5a34c5f2d3d673c6 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Tue, 8 Jan 2008 04:13:32 +0000 Subject: [PATCH] dmllib:rcache_set()/rcache_get() - use clone() function which we can support in PHP4 - MDL-12827 --- lib/dmllib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dmllib.php b/lib/dmllib.php index 0597c8acbb..4c55e499f9 100644 --- a/lib/dmllib.php +++ b/lib/dmllib.php @@ -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; -- 2.39.5