View Issue Details

IDProjectCategoryView StatusLast Update
0005482OXID eShop (all versions)1.03. Basket, checkout processpublic2023-11-22 15:04
Reportergpayer Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Platform32bit 
Product Version4.7.8 / 5.0.8 
Summary0005482: Voucher validity check fails on 32bit system with end dates greater than "2038-01-19 03:14:07"
DescriptionThe database allows dates like "2060-01-01 00:00:00" on 32bit systems. However if you use strtotime to convert this date to a timestamp on a 32bit systems, this function fails.

As oxVoucher::_isValidDate() uses strtotime to validate the date, this fails as well.

This can happen if voucher series are generated automatically, e.g. by an importer script.
Steps To Reproduce* install shop on a 32bit system
* create voucher serie by script, including the line
  $oVoucherSerie->oxvoucherseries__oxenddate = new oxField('2060-01-01 00:00:00');
* create some vouchers
* try to use one
Additional InformationThis bug can be fixed by using the DateTime class and its "diff" method. By testing the sign of the resulting difference ($diff->format('%R')), you get the necessary data.

"strtotime" is probably used all over the source code, so there will be more bugs like this elsewhere.
TagsVoucher
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

martinwegele

2015-06-02 10:04

reporter   ~0011004

In EE 5.2.4 strtotime is only used in three models (oxactions, oxorderfile and oxvoucher) so it is not "used all over the source code".

SvenBrunk

2023-11-22 15:04

administrator   ~0015893

Since the maximum possible end date available from this on 32bit systems is not so far away anymore, we would not recommend to install the shop on 32 bit systems anymore.