File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1136,8 +1136,9 @@ protected function _processSave($entity, $options) {
1136
1136
1137
1137
$ associated = $ options ['associated ' ];
1138
1138
$ options ['associated ' ] = [];
1139
+ $ validate = $ options ['validate ' ];
1139
1140
1140
- if ($ options [ ' validate ' ] && !$ this ->validate ($ entity , $ options )) {
1141
+ if ($ validate && !$ this ->validate ($ entity , $ options )) {
1141
1142
return false ;
1142
1143
}
1143
1144
@@ -1153,7 +1154,7 @@ protected function _processSave($entity, $options) {
1153
1154
$ this ,
1154
1155
$ entity ,
1155
1156
$ options ['associated ' ],
1156
- $ options ->getArrayCopy ()
1157
+ [ ' validate ' => ( bool ) $ validate ] + $ options ->getArrayCopy ()
1157
1158
);
1158
1159
1159
1160
if (!$ saved && $ options ['atomic ' ]) {
Original file line number Diff line number Diff line change @@ -2106,7 +2106,7 @@ public function testSaveWithDifferentValidatorAndAssociations() {
2106
2106
$ this ->assertFalse ($ table ->save ($ entity , ['validate ' => 'custom ' ]));
2107
2107
$ this ->assertNotEmpty ($ entity ->author ->errors ('thing ' ));
2108
2108
2109
- $ this ->assertSame ( $ entity , $ table ->save ($ entity ), 'default was not used ' );
2109
+ $ this ->assertFalse ( $ table ->save ($ entity ), 'default was not used ' );
2110
2110
}
2111
2111
2112
2112
/**
You can’t perform that action at this time.
0 commit comments