File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,16 +133,14 @@ public function save(): int
133133 $ insert ->values ($ this ->data );
134134
135135 $ statement = $ this ->sql ->prepareStatementForSqlObject ($ insert );
136- if ($ statement instanceof StatementInterface) {
137- $ result = $ statement ->execute ();
138- if (($ primaryKeyValue = $ result ->getGeneratedValue ()) && count ($ this ->primaryKeyColumn ) === 1 ) {
139- $ this ->primaryKeyData = [$ this ->primaryKeyColumn [0 ] => $ primaryKeyValue ];
140- } else {
141- $ this ->processPrimaryKeyData ();
142- }
143- $ rowsAffected = $ result ->getAffectedRows ();
144- unset($ statement , $ result );
136+ $ result = $ statement ->execute ();
137+ if (($ primaryKeyValue = $ result ->getGeneratedValue ()) && count ($ this ->primaryKeyColumn ) === 1 ) {
138+ $ this ->primaryKeyData = [$ this ->primaryKeyColumn [0 ] => $ primaryKeyValue ];
139+ } else {
140+ $ this ->processPrimaryKeyData ();
145141 }
142+ $ rowsAffected = $ result ->getAffectedRows ();
143+ unset($ statement , $ result );
146144
147145 $ where = [];
148146 foreach ($ this ->primaryKeyColumn as $ pkColumn ) {
You can’t perform that action at this time.
0 commit comments