MDL-12882 - we were caching empty records which caused clone warnings

backported from MOODLE_19_STABLE
This commit is contained in:
poltawski
2008-01-08 20:21:30 +00:00
parent 51f90f8839
commit 6b3eca01f2
+1 -1
View File
@@ -416,7 +416,7 @@ function get_record($table, $field1, $value1, $field2='', $value2='', $field3=''
// If we're caching records, store this one
// (supposing we got something - we don't cache failures)
if ($docache) {
if (isset($record)) {
if ($record !== false) {
rcache_set($table, $value1, $record);
} else {
rcache_releaseforfill($table, $value1);