mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing Controller::cleanUpFields() formatting bug introduced in [4596] (Ticket #2322)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4733 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
20645337f7
commit
c276d65d6f
1 changed files with 1 additions and 3 deletions
|
@ -925,9 +925,7 @@ class Controller extends Object {
|
|||
unset($this->data[$modelClass][$field['name'] . '_meridian']);
|
||||
|
||||
$newDate = null;
|
||||
if ('datetime' == $field['type'] && $useNewDate) {
|
||||
$newDate = "{$_year}-{$_month}-{$_day}:{$_hour}:{$_min}:{$_sec}";
|
||||
} else if ('timestamp' == $field['type'] && $useNewDate) {
|
||||
if (in_array($field['type'], array('datetime', 'timestamp')) && $useNewDate) {
|
||||
$newDate = "{$_year}-{$_month}-{$_day} {$_hour}:{$_min}:{$_sec}";
|
||||
} else if ('date' == $field['type'] && $useNewDate) {
|
||||
$newDate = "{$_year}-{$_month}-{$_day}";
|
||||
|
|
Loading…
Add table
Reference in a new issue