升级thinkphp到5.1.39

This commit is contained in:
cxdbz committed 2019-11-28 19:33:13 +08:00
1 parent c8839fa4f8
commit a58d04e7e2
37 files changed
+546 -192

No files matched your search

@@ -11,6 +11,7 @@
namespace think\model\relation;
use Closure;
use think\db\Query;
use think\Exception;
use think\Loader;
@@ -53,7 +54,7 @@ class MorphOne extends Relation
*/
public function getRelation($subRelation = '', $closure = null)
{
if ($closure) {
if ($closure instanceof Closure) {
$closure($this->query);
}
@@ -186,7 +187,7 @@ class MorphOne extends Relation
protected function eagerlyMorphToOne($where, $relation, $subRelation = '', $closure = null)
{
// 预载入关联查询 支持嵌套预载入
if ($closure) {
if ($closure instanceof Closure) {
$closure($this->query);
}