Skip to content

Commit

Permalink
Fix preg_split subject param null deprecated on FormHelper::dateTime
Browse files Browse the repository at this point in the history
  • Loading branch information
diegosurita committed Jan 26, 2024
1 parent 965c740 commit 1009e3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ public function dateTime($fieldName, $dateFormat = 'DMY', $timeFormat = '12', $a
}

$selects = array();
foreach (preg_split('//', $dateFormat, -1, PREG_SPLIT_NO_EMPTY) as $char) {
foreach (preg_split('//', (string)$dateFormat, -1, PREG_SPLIT_NO_EMPTY) as $char) {
switch ($char) {
case 'Y':
$attrs['Year']['value'] = $year;
Expand Down

0 comments on commit 1009e3b

Please sign in to comment.