projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: removed all closing tags in php files.
[fa-stable.git]
/
includes
/
date_functions.inc
diff --git
a/includes/date_functions.inc
b/includes/date_functions.inc
index 17a86ff7cf926101adaa8a6d0d69c21120f1fa14..4d0fd5f89c3f1ed8b61af6deca87a7a7fd7ac3e4 100644
(file)
--- a/
includes/date_functions.inc
+++ b/
includes/date_functions.inc
@@
-347,8
+347,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 -
@@
-358,6
+356,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 */
@@
-667,4
+667,3
@@
function islamic_to_gregorian($i_y, $i_m, $i_d)
}
return array($y, $m, $d);
}
}
return array($y, $m, $d);
}
-?>