From 79c2e77a008315efd17063860cbf426d7aeabb8d Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Mon, 13 Jan 2020 15:35:46 +0000 Subject: [PATCH] should fix: https://github.com/postfixadmin/postfixadmin/issues/323 --- functions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.inc.php b/functions.inc.php index 64a033e6..cb29f23d 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -720,7 +720,7 @@ function encode_header($string, $default_charset = "utf-8") { $cur_l = $iOffset = 0; for ($i = 0; $i < $j; ++$i) { - switch ($string{$i}) { + switch ($string[$i]) { case '=': case '<': case '>': @@ -2137,7 +2137,7 @@ function gen_show_status($show_alias) { $now = "datetime('now')"; } - $stat_result = db_query_one("SELECT * FROM ". table_by_key('mailbox') ." WHERE username = ? AND password_expiry <= ? AND active = ?", array( $show_alias , $now , db_get_boolean(true) )); + $stat_result = db_query_one("SELECT * FROM ". table_by_key('mailbox') ." WHERE username = ? AND password_expiry <= $now AND active = ?", array( $show_alias , db_get_boolean(true) )); if (!empty($stat_result)) { $stat_string .= "" . $CONF['show_status_text'] . " ";