ソースを参照

Apply suggestions from code review

Co-authored-by: othercorey <corey.taylor.fl@gmail.com>
Mark Story 5 年 前
コミット
6442fd5234

+ 1 - 1
src/Controller/Component/SecurityComponent.php

@@ -261,7 +261,7 @@ class SecurityComponent extends Component
             throw new AuthSecurityException(sprintf($message, '_Token.fields'));
         }
         if (!is_string($check['_Token']['fields'])) {
-            throw new AuthSecurityException("'_Token.fields' was invalid.");
+            throw new AuthSecurityException("'_Token.fields' is invalid.");
         }
         if (!isset($check['_Token']['unlocked'])) {
             throw new AuthSecurityException(sprintf($message, '_Token.unlocked'));

+ 1 - 1
src/Form/FormProtector.php

@@ -238,7 +238,7 @@ class FormProtector
             return null;
         }
         if (!is_string($formData['_Token']['fields'])) {
-            $this->debugMessage = '`_Token.fields` was invalid.';
+            $this->debugMessage = '`_Token.fields` is invalid.';
 
             return null;
         }

+ 1 - 1
tests/TestCase/Controller/Component/SecurityComponentTest.php

@@ -948,7 +948,7 @@ class SecurityComponentTest extends TestCase
             ],
         ]));
         Configure::write('debug', false);
-        $result = $this->validatePost('SecurityException', "'_Token.fields' was invalid.");
+        $result = $this->validatePost('SecurityException', "'_Token.fields' is invalid.");
         $this->assertFalse($result);
     }
 

+ 1 - 1
tests/TestCase/Form/FormProtectorTest.php

@@ -151,7 +151,7 @@ class FormProtectorTest extends TestCase
                 'fields' => [],
             ],
         ];
-        $this->validate($data, '`_Token.fields` was invalid.');
+        $this->validate($data, '`_Token.fields` is invalid.');
     }
 
     /**