mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
changing Model::create to use Set::filter
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5272 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
63387a79e3
commit
dad80d947d
1 changed files with 1 additions and 2 deletions
|
@ -809,7 +809,6 @@ class Model extends Overloadable {
|
||||||
|
|
||||||
foreach($data as $n => $v) {
|
foreach($data as $n => $v) {
|
||||||
if (is_array($v)) {
|
if (is_array($v)) {
|
||||||
|
|
||||||
foreach($v as $x => $y) {
|
foreach($v as $x => $y) {
|
||||||
if ($n == $this->name) {
|
if ($n == $this->name) {
|
||||||
if (isset($this->validationErrors[$x])) {
|
if (isset($this->validationErrors[$x])) {
|
||||||
|
@ -922,7 +921,7 @@ class Model extends Overloadable {
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->validationErrors = array();
|
$this->validationErrors = array();
|
||||||
$this->set(array_filter($defaults));
|
$this->set(Set::filter($defaults));
|
||||||
$this->set($data);
|
$this->set($data);
|
||||||
return $this->data;
|
return $this->data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue