Skip to content

Commit

Permalink
fix warning in html form class (#31860)
Browse files Browse the repository at this point in the history
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
  • Loading branch information
Hystepik and Hystepik authored Nov 16, 2024
1 parent 4f5d3dd commit 1ec2b05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/class/html.form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -7207,7 +7207,7 @@ public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empt
$shour = '';
$smin = '';
$ssec = '';
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/', $set_time, $reg)) { // deprecated usage
if (!empty($set_time) && preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/', $set_time, $reg)) { // deprecated usage
// Date format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'
$syear = (!empty($reg[1]) ? $reg[1] : '');
$smonth = (!empty($reg[2]) ? $reg[2] : '');
Expand Down

0 comments on commit 1ec2b05

Please sign in to comment.