Don't convert unset date
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1125 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
64d616c0cc
commit
fa2c074fcd
|
@ -124,7 +124,7 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
|
|||
}
|
||||
|
||||
function editVal($val, $field) {
|
||||
if (ereg('date|timestamp', $field["type"])) {
|
||||
if (ereg('date|timestamp', $field["type"]) && isset($val)) {
|
||||
return preg_replace('~^([0-9]{2}([0-9]+))-(0?([0-9]+))-(0?([0-9]+))~', lang('$1-$3-$5'), $val);
|
||||
}
|
||||
return $val;
|
||||
|
|
Loading…
Reference in a new issue