Skip to content

Commit e4183c9

Browse files
committed
改进闭包查询的时候查询缓存出错
1 parent 8b619b1 commit e4183c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/db/Connection.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,11 @@ protected function getCacheKey($value, $options, $bind = [])
19951995
if (isset($data)) {
19961996
return 'think:' . (is_array($options['table']) ? key($options['table']) : $options['table']) . '|' . $data;
19971997
} else {
1998-
return md5(serialize($options) . serialize($bind));
1998+
try {
1999+
return md5(serialize($options) . serialize($bind));
2000+
} catch (\Exception $e) {
2001+
return;
2002+
}
19992003
}
20002004
}
20012005

0 commit comments

Comments
 (0)