Skip to content

Commit 07ed1b3

Browse files
committed
Fix ORM updating return
1 parent 011629e commit 07ed1b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Base Model
99
*
1010
* @author Nick Tsai <myintaer@gmail.com>
11-
* @version 2.16.3.1
11+
* @version 2.16.4
1212
* @see https://github.com/yidas/codeigniter-model
1313
*/
1414
class Model extends \CI_Model implements \ArrayAccess
@@ -1059,7 +1059,7 @@ public function save($runValidation=true)
10591059
return false;
10601060
}
10611061

1062-
$result = $this->update($this->_writeProperties, $this->_selfCondition, $runValidation);
1062+
$result = ($this->_writeProperties) ? $this->update($this->_writeProperties, $this->_selfCondition, $runValidation) : true;
10631063
// Check the primary key is changed
10641064
if ($result) {
10651065

0 commit comments

Comments
 (0)