Skip to content

Commit c2a40fc

Browse files
authored
Merge pull request #996 from noplanman/995-fix_poll_mysql_saving
Save boolean value for Polls correctly in DB.
2 parents 4664688 + 1049332 commit c2a40fc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1111
### Deprecated
1212
### Removed
1313
### Fixed
14+
- Boolean value for Polls gets saved correctly in MySQL DB.
1415
### Security
1516

1617
## [0.60.0] - 2019-08-16

src/DB.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ public static function insertPollRequest(Poll $poll)
845845
$sth->bindValue(':id', $poll->getId());
846846
$sth->bindValue(':question', $poll->getQuestion());
847847
$sth->bindValue(':options', self::entitiesArrayToJson($poll->getOptions() ?: null));
848-
$sth->bindValue(':is_closed', $poll->getIsClosed());
848+
$sth->bindValue(':is_closed', $poll->getIsClosed(), PDO::PARAM_INT);
849849
$sth->bindValue(':created_at', self::getTimestamp());
850850

851851
return $sth->execute();

0 commit comments

Comments
 (0)