Commit e7edf598 authored by Lester Chan's avatar Lester Chan Committed by GitHub
Browse files

Merge pull request #100 from elkirkmo/master

Converted bool to int to fix bug #92.
parents 96701111 12d43d77
......@@ -30,7 +30,7 @@ if(!empty($_POST['do'])) {
$pollq_active = (int) sanitize_key($_POST['pollq_active']);
// Poll Start Date
$pollq_timestamp = isset( $_POST['poll_timestamp_old'] ) ? $_POST['poll_timestamp_old'] : current_time( 'timestamp' );
$edit_polltimestamp = isset( $_POST['edit_polltimestamp'] ) && (int) sanitize_key( $_POST['edit_polltimestamp'] ) === 1 ? 1 : false;
$edit_polltimestamp = isset( $_POST['edit_polltimestamp'] ) && (int) sanitize_key( $_POST['edit_polltimestamp'] ) === 1 ? 1 : 0;
if($edit_polltimestamp === 1) {
$pollq_timestamp_day = (int) sanitize_key($_POST['pollq_timestamp_day']);
$pollq_timestamp_month = (int) sanitize_key($_POST['pollq_timestamp_month']);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment