Skip to content
Snippets Groups Projects
Commit dfc378db authored by root's avatar root
Browse files

Fixes : E_ALL cleanups in Products module

parent 72a1bea1
No related branches found
No related tags found
2 merge requests!1233E_ALL fixes across modules for PHP 8.x,!1201Fixes : E_ALL cleanups in Products module
......@@ -137,12 +137,12 @@ class DateTimeField {
list($d, $m, $y) = explode('-', $date);
break;
case 'mm-dd-yyyy':
if (strpos($date, '-') !== false && count(explode('-', $date)) === 3) {
if (substr_count($date, '-') == 2) {
list($m, $d, $y) = explode('-', $date);
}
break;
case 'yyyy-mm-dd':
if (strpos($date, '-') !== false && count(explode('-', $date)) === 3) {
if (substr_count($date, '-') == 2) {
list($y, $m, $d) = explode('-', $date);
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment