View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005482 | OXID eShop (all versions) | 1.03. Basket, checkout process | public | 2013-10-22 11:18 | 2023-11-22 15:04 |
Reporter | gpayer | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Platform | 32bit | ||||
Product Version | 4.7.8 / 5.0.8 | ||||
Summary | 0005482: Voucher validity check fails on 32bit system with end dates greater than "2038-01-19 03:14:07" | ||||
Description | The 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 Information | This 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. | ||||
Tags | Voucher | ||||
Theme | Not defined | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
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". |
|
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. |