Update functions.lib.php
This commit is contained in:
parent
e4b3dda7f0
commit
761ec7b790
@ -2390,7 +2390,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
|
|||||||
// Analyze date
|
// Analyze date
|
||||||
$reg = array();
|
$reg = array();
|
||||||
if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) { // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000
|
if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) { // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000
|
||||||
dol_print_error('',"Functions.lib::dol_print_date function called with a bad value from page ".$_SERVER["PHP_SELF"]);
|
dol_print_error('', "Functions.lib::dol_print_date function called with a bad value from page ".$_SERVER["PHP_SELF"]);
|
||||||
return '';
|
return '';
|
||||||
} elseif (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)) { // Still available to solve problems in extrafields of type date
|
} elseif (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)) { // Still available to solve problems in extrafields of type date
|
||||||
// This part of code should not be used anymore.
|
// This part of code should not be used anymore.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user