diff --git a/library/think/Validate.php b/library/think/Validate.php index 89128f2f..69189ce4 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -27,7 +27,7 @@ class Validate ]; // 验证失败错误信息 - protected static $error = []; + protected static $error = null; /** * 设置正则验证规则 diff --git a/tests/thinkphp/library/think/validateTest.php b/tests/thinkphp/library/think/validateTest.php index 7f184440..0d445971 100644 --- a/tests/thinkphp/library/think/validateTest.php +++ b/tests/thinkphp/library/think/validateTest.php @@ -10,7 +10,7 @@ // +---------------------------------------------------------------------- /** - * 模型类测试 + * Validate类测试 */ namespace tests\thinkphp\library\think; @@ -119,7 +119,6 @@ class validateTest extends \PHPUnit_Framework_TestCase 'password' => ['md5', 'callback'], 'nickname' => [[ & $this, 'fillName'], 'callback', 'cn_'], 'phone' => function ($value, $data) { - echo $value; return trim($value); }, 'ab' => ['a,b', 'serialize'],