From 1b31d99b6abcddb17b2a2471db1babf2e7ed8969 Mon Sep 17 00:00:00 2001 From: Flavius Date: Thu, 26 Apr 2018 14:43:47 +0300 Subject: [PATCH] Fix #11985 Refs https://github.com/cakephp/cakephp/issues/11982 & https://github.com/cakephp/cakephp/pull/11985 --- src/Form/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form/Form.php b/src/Form/Form.php index 1deac2bc485..5c2197b346f 100644 --- a/src/Form/Form.php +++ b/src/Form/Form.php @@ -226,7 +226,7 @@ public function validate(array $data) $validator = $this->getValidator(); if (!$validator->count()) { $method = new ReflectionMethod($this, 'validator'); - if ($method->getDeclaringClass() !== __CLASS__) { + if ($method->getDeclaringClass()->getName() !== __CLASS__) { $validator = $this->validator(); } }