View Issue Details

IDProjectCategoryView StatusLast Update
0007396OXID eShop (all versions)4.07. Source code, Testpublic2024-08-07 15:49
Reporterb.blasius Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version6.5.0 
Summary0007396: TypeError in UtilsDate.php
Descriptionin oxideshop-ce/source/Core/UtilsDate.php "formatDBDate" $sDate is split in array $aDate
// preparing date array
$sDate = isset($aData[0]) ? $aData[0] : '';
$aDate = preg_split('/[\/.-]/', $sDate);

so we have an array of strings passed to
$this->_processDate($aTime, $aDate, $oStr->strstr($sDate, '.'), $sFormat);

in "_processDate" this array is used for mktime($aTime[0], $aTime[1], $aTime[2], $aDate[1], $aDate[0], $aDate[2])).
but mktime funktion expects int for all $aDate and $aTime values resulting in a type error "mktime(): Argument #6 ($year) must be of type ?int, string given"
TagsException, PHP
ThemeNot defined
BrowserNot defined
PHP Version8.0
Database VersionMySQL 5.7

Activities

QA

2022-12-23 11:27

administrator   ~0014969

-MK