升级thinkphp到5.1.39
This commit is contained in:
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 MorphMany extends Relation
|
||||
*/
|
||||
public function getRelation($subRelation = '', $closure = null)
|
||||
{
|
||||
if ($closure) {
|
||||
if ($closure instanceof Closure) {
|
||||
$closure($this->query);
|
||||
}
|
||||
|
||||
@@ -197,7 +198,7 @@ class MorphMany extends Relation
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($closure) {
|
||||
if ($closure instanceof Closure) {
|
||||
$return = $closure($this->query);
|
||||
|
||||
if ($return && is_string($return)) {
|
||||
@@ -224,7 +225,7 @@ class MorphMany extends Relation
|
||||
*/
|
||||
public function getRelationCountQuery($closure, $aggregate = 'count', $field = '*', &$aggregateAlias = '')
|
||||
{
|
||||
if ($closure) {
|
||||
if ($closure instanceof Closure) {
|
||||
$return = $closure($this->query);
|
||||
|
||||
if ($return && is_string($return)) {
|
||||
@@ -253,7 +254,7 @@ class MorphMany extends Relation
|
||||
// 预载入关联查询 支持嵌套预载入
|
||||
$this->query->removeOption('where');
|
||||
|
||||
if ($closure) {
|
||||
if ($closure instanceof Closure) {
|
||||
$closure($this->query);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user