File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 8
8
* Base Model
9
9
*
10
10
* @author Nick Tsai <[email protected] >
11
- * @version 2.17.0
11
+ * @version 2.17.1
12
12
* @see https://github.com/yidas/codeigniter-model
13
13
*/
14
14
class Model extends \CI_Model implements \ArrayAccess
@@ -1071,6 +1071,8 @@ public function save($runValidation=true)
1071
1071
$ this ->_selfCondition = $ insertID ;
1072
1072
// Event
1073
1073
$ this ->afterSave (true , $ this ->_readProperties );
1074
+ // Reset properties
1075
+ $ this ->_writeProperties = [];
1074
1076
}
1075
1077
1076
1078
} else {
@@ -1091,11 +1093,10 @@ public function save($runValidation=true)
1091
1093
$ this ->_readProperties = array_merge ($ this ->_readProperties , $ this ->_writeProperties );
1092
1094
// Event
1093
1095
$ this ->afterSave (true , $ this ->_readProperties );
1096
+ // Reset properties
1097
+ $ this ->_writeProperties = [];
1094
1098
}
1095
1099
}
1096
-
1097
- // Reset properties
1098
- $ this ->_writeProperties = [];
1099
1100
1100
1101
return $ result ;
1101
1102
}
You can’t perform that action at this time.
0 commit comments