diff --git a/htdocs/lib/functions.inc.php3 b/htdocs/lib/functions.inc.php3
index c2982c1f1e2..6bdf7d18456 100644
--- a/htdocs/lib/functions.inc.php3
+++ b/htdocs/lib/functions.inc.php3
@@ -286,7 +286,7 @@ function print_oui_non($value)
*/
function print_date_select($set_time='')
{
- if (! isset($set_time))
+ if (! $set_time)
{
$set_time = time();
}
@@ -305,8 +305,10 @@ function print_date_select($set_time='')
$strmonth[12] = "Décembre";
$smonth = 1;
- $syear = date("Y", $set_time);
+
$cday = date("d", $set_time);
+ $cmonth = date("n", $set_time);
+ $syear = date("Y", $set_time);
print "";
- $cmonth = date("n", $set_time);
+
print "