闭包查询使用cache(true)抛出异常

This commit is contained in:
thinkphp
2018-04-09 11:49:01 +08:00
parent 142934607d
commit fd9b019840
2 changed files with 2 additions and 1 deletions

View File

@@ -66,6 +66,7 @@ return [
'relation data not exists' => '关联数据不存在',
'relation not support' => '关联不支持',
'chunk not support order' => 'Chunk不支持调用order方法',
'closure not support cache(true)' => '使用闭包查询不支持cache(true)请指定缓存Key',
// 上传错误信息
'unknown upload error' => '未知上传错误!',

View File

@@ -2441,7 +2441,7 @@ class Query
try {
return md5($prefix . serialize($options) . serialize($bind));
} catch (\Exception $e) {
return;
throw new Exception('closure not support cache(true)');
}
}