From 142934607d7c0f1ff879fd7b61baf3f247421b11 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 9 Apr 2018 11:38:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Query=E7=B1=BB=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E9=97=AD=E5=8C=85=E6=9F=A5=E8=AF=A2=E5=90=8E=E7=9A=84?= =?UTF-8?q?cache=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 43fe2745..96cd8de1 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2436,8 +2436,12 @@ class Query if (isset($data)) { return 'think:' . $prefix . (is_array($options['table']) ? key($options['table']) : $options['table']) . '|' . $data; - } else { + } + + try { return md5($prefix . serialize($options) . serialize($bind)); + } catch (\Exception $e) { + return; } }