Skip to content

Commit

Permalink
fix issue with mysql bools on some versions
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedevin committed Feb 14, 2018
1 parent 979e3d9 commit 053147c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ public function save($insert = null) {
switch ($field->type) {
case 'boolean':
$this->{$field->field} = $this->{$field->field} ? true : false;
if ($this->db()->driver() == 'mysql') {
$this->{$field->field} = $this->{$field->field} ? 1 : 0;
}
break;

case 'int':
Expand Down

0 comments on commit 053147c

Please sign in to comment.