From 65de9655c6002bbfee76f1c3c45b312615fb375a Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sun, 4 Oct 2015 17:03:34 -0700 Subject: BUGFIX: fix mysql insert statements (null values for timestamps didn't work anymore) a dreamhost update to a newer sql version changed the default behavior for null inserts for timestamps. They don't insert the current timestamp anymore when a config option for mysql is set (which seems to be the case). solution: instead of inserting null always insert current_timestamp --- include/register.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/register.php') diff --git a/include/register.php b/include/register.php index 028e1bb..d0b18b1 100644 --- a/include/register.php +++ b/include/register.php @@ -113,7 +113,7 @@ if(myisset('Rfullname','Remail','Rtimezone') ) $r=DB_query('INSERT INTO User VALUES(NULL,'.DB_quote_smart($_REQUEST['Rfullname']). ','.DB_quote_smart($_REQUEST['Remail']). ','.DB_quote_smart($hash). - ','.DB_quote_smart($_REQUEST['Rtimezone']).',NULL,NULL)'); + ','.DB_quote_smart($_REQUEST['Rtimezone']).',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)'); } else /* hash function didn't work */ $r=0; @@ -124,7 +124,7 @@ if(myisset('Rfullname','Remail','Rtimezone') ) $r=DB_query('INSERT INTO User VALUES(NULL,'.DB_quote_smart($_REQUEST['Rfullname']). ','.DB_quote_smart($_REQUEST['Remail']). ','.DB_quote_smart(md5($password)). - ','.DB_quote_smart($_REQUEST['Rtimezone']).',NULL,NULL)'); + ','.DB_quote_smart($_REQUEST['Rtimezone']).',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)'); if($r) { include_once('openid.php'); -- cgit v1.2.3-18-g5258