ソースを参照

Merge branch 'master' into 3.next

Mark Story 8 年 前
コミット
48b500eee1
3 ファイル変更4 行追加4 行削除
  1. 2 2
      src/ORM/Association.php
  2. 1 1
      src/ORM/EagerLoader.php
  3. 1 1
      src/Validation/Validation.php

+ 2 - 2
src/ORM/Association.php

@@ -120,7 +120,7 @@ abstract class Association
      * A list of conditions to be always included when fetching records from
      * A list of conditions to be always included when fetching records from
      * the target association
      * the target association
      *
      *
-     * @var array
+     * @var array|callable
      */
      */
     protected $_conditions = [];
     protected $_conditions = [];
 
 
@@ -488,7 +488,7 @@ abstract class Association
      * the target association.
      * the target association.
      *
      *
      * @see \Cake\Database\Query::where() for examples on the format of the array
      * @see \Cake\Database\Query::where() for examples on the format of the array
-     * @return array
+     * @return array|callable
      */
      */
     public function getConditions()
     public function getConditions()
     {
     {

+ 1 - 1
src/ORM/EagerLoader.php

@@ -406,7 +406,7 @@ class EagerLoader
 
 
             $pointer += [$table => []];
             $pointer += [$table => []];
 
 
-            if (isset($options['queryBuilder']) && isset($pointer[$table]['queryBuilder'])) {
+            if (isset($options['queryBuilder'], $pointer[$table]['queryBuilder'])) {
                 $first = $pointer[$table]['queryBuilder'];
                 $first = $pointer[$table]['queryBuilder'];
                 $second = $options['queryBuilder'];
                 $second = $options['queryBuilder'];
                 $options['queryBuilder'] = function ($query) use ($first, $second) {
                 $options['queryBuilder'] = function ($query) use ($first, $second) {

+ 1 - 1
src/Validation/Validation.php

@@ -1333,7 +1333,7 @@ class Validation
         if (isset($options['width'])) {
         if (isset($options['width'])) {
             $validWidth = self::comparison($width, $options['width'][0], $options['width'][1]);
             $validWidth = self::comparison($width, $options['width'][0], $options['width'][1]);
         }
         }
-        if (isset($validHeight) && isset($validWidth)) {
+        if (isset($validHeight, $validWidth)) {
             return ($validHeight && $validWidth);
             return ($validHeight && $validWidth);
         }
         }
         if (isset($validHeight)) {
         if (isset($validHeight)) {