Skip to content

Commit 053147c

Browse files
committed
fix issue with mysql bools on some versions
1 parent 979e3d9 commit 053147c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Resource.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ public function save($insert = null) {
332332
switch ($field->type) {
333333
case 'boolean':
334334
$this->{$field->field} = $this->{$field->field} ? true : false;
335+
if ($this->db()->driver() == 'mysql') {
336+
$this->{$field->field} = $this->{$field->field} ? 1 : 0;
337+
}
335338
break;
336339

337340
case 'int':

0 commit comments

Comments
 (0)