mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for Ticket #2161
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4582 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
82c4b1e0a9
commit
0e44a16fbd
1 changed files with 1 additions and 1 deletions
|
@ -1676,7 +1676,7 @@ class Model extends Overloadable {
|
|||
), $validator);
|
||||
|
||||
if (empty($validator['on']) || ($validator['on'] == 'create' && !$this->exists()) || ($validator['on'] == 'update' && $this->exists())) {
|
||||
if (!isset($data[$fieldName]) && $validator['allowEmpty'] == false) {
|
||||
if (empty($data[$fieldName]) && $validator['allowEmpty'] == false) {
|
||||
$this->invalidate($fieldName, $validator['message']);
|
||||
} elseif (isset($data[$fieldName])) {
|
||||
if (is_array($validator['rule'])) {
|
||||
|
|
Loading…
Reference in a new issue