projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed better CSS combobox select.
[fa-stable.git]
/
includes
/
date_functions.inc
diff --git
a/includes/date_functions.inc
b/includes/date_functions.inc
index 2c99d059ae788fc439b6e678bb142799e012851e..96ecb31bcdcf2967a2e90c6cb4173410f1da88bb 100644
(file)
--- a/
includes/date_functions.inc
+++ b/
includes/date_functions.inc
@@
-344,8
+344,6
@@
function sql2date($date_)
global $date_system;
//for MySQL dates are in the format YYYY-mm-dd
global $date_system;
//for MySQL dates are in the format YYYY-mm-dd
- if ($date_ == null || strlen($date_) == 0)
- return "";
if (strpos($date_, "/"))
{ // In MySQL it could be either / or -
if (strpos($date_, "/"))
{ // In MySQL it could be either / or -
@@
-355,6
+353,8
@@
function sql2date($date_)
{
list($year, $month, $day) = explode("-", $date_);
}
{
list($year, $month, $day) = explode("-", $date_);
}
+ if (!isset($day)) // data format error
+ return "";
if (strlen($day) > 4)
{ /*chop off the time stuff */
if (strlen($day) > 4)
{ /*chop off the time stuff */