From: Joe Hunt Date: Mon, 28 Aug 2017 19:13:47 +0000 (+0200) Subject: Fix in date2sql function. X-Git-Tag: v2.4.3~55 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=7c0d74930927c837225710f89591cba93d16ac5f Fix in date2sql function. --- diff --git a/includes/date_functions.inc b/includes/date_functions.inc index 7aa16acc..c0bcbe94 100644 --- a/includes/date_functions.inc +++ b/includes/date_functions.inc @@ -383,10 +383,10 @@ and converts to a yyyy/mm/dd format */ $how = user_date_format(); $sep = $SysPrefs->dateseps[user_date_sep()]; + $date_ = trim($date_); if ($date_ == null || strlen($date_) == 0) return ""; - $date_ = trim($date_); $year = $month = $day = 0; // Split up the date by the separator based on "how" to split it if ($how == 0 || $how == 3) // MMDDYYYY or MmmDDYYYY